Yes, it is possible for a person to be gay and not know it.
However, it's very uncommon and even the latest of bloomers realize they're attracted to the same sex by their early 20s.
The causes of disconnect I've heard about include: growing up in an extremely sheltered and/or religious atmosphere, being totally preoccupied with other things in life, and most commonly, not realizing that the "admiration" they have for the same sex is sexual, not platonic. Basically, the attraction is there from puberty or before, but the sexual connection isn't made until very late teens or early 20s.
What's FAR more common, like 1000 to 1, or even 10,000 to 1, are people who hide so deeply in the closet that they appear clueless. Deep down they know the desire is there but they do everything they can to bury and avoid dealing with it. Because they've been doing this since puberty, in time they become very skilled at playing dumb, even to the point where they might be able to fool a lie-detector.
For a straight spouse, the only genuinely effective ways to deal with these people are to 1) not trust the closeted person's words, instead watch their actions, and, 2) TRUST YOUR OWN GUT INSTINCTS. Our brains pick up all kinds of information that we don't consciously process. When you have a gut feeling about something, you're not crazy, that's the truth trying to break free.