No, you don't always know if you are gay. I've spent 25 years of my life thinking I was straight and accepting the awkwardness of being with women as normal... I couldn't even fathom the idea that I might be gay despite the numerous (and fairly obvious) hints throughout my life.
Here I am... 25... and I like men.
It's not something you decide, and it's there your entire life. Some people accept it early on. Other people, like me, do a damn good job of repressing it.