Genes, maybe not. Hormones and brain chemistry, almost definitely.
There is speculation that exposure to excessive amounts of estrogen in the womb predispose male children to homosexuality. In households where multiple male children have been born, the youngest ones have progressively higher propensities towards homosexuality. Basically, a woman's body treats a male child like a foreign invader and the more sons she has, the stronger the antibody response becomes.
Also, in studying gay guys brains with MRI, they've got structures that more developed in women, less in straight guys.
To me, one of the most telling that it's something genetic (like I said, I'm more of the hormone/brain chemistry school), the percentage of twins raised in separate houses. If one is gay, the other has WELL more than a 50% chance of being gay.
Basically, a gay guy is more like a woman, mentally
Google neurobiology and homosexuality, craploads of articles out there.
^^^ This, I completely agree with MM, hormones, brain chemistry and brain development/usage have a lot to do with it for me, raising and friends/environment have to do with it a bit as well, I dont judge people who get turned on by having sex just with redheads, or just with big breasted women, or just men ....
Also not all "gays" are the same (quotations because thy arent a "group") as Adam Lambert once said "The only thing that is the same about everyone in the gay community is that we're gay"