If your boyfriend is gay, this may be a difficult thing to come to terms with. You may feel like you have been betrayed or taken advantage of. However, you need to remember that this is a big deal for him, too. It might be a very painful experience for him to realize that he is a homosexual, especially in the current climate of anti-gay bigotry. He could be worried about what other people will think, or that he will have to give up the life that he has built with you.
You catch him staring at other men in semi-clad clothes on a beach, or while he is clubbing. Or he has a few sexual fantasies that turn him on more than others. He might even say that he would like to try some sort of role-play that feels geared toward men, or want you to use toys that have an implied male end game. This could be something he does as a kinky hobby, or it might be that he is exploring his sexuality as a gay man.
If he doesn't talk about his homosexuality with you, or makes vague references to being a closet homosexual, this is one of the most clear-cut signs that he is. He might be very scared to open up and talk about this with you, because he knows that society hates gay people, and he doesn't want to have to pay the price for coming out. He might also be worried that if he is gay, you will break up with him, or that other people will assume that he is a bad person.