I don't believe homosexuality is genetic. But if it were genetic, there are two possible explanations for how it could survive genetically.
One is "kin selection". This theory is that because homosexuals do not have their own children, they're free to make other contributions to the clan. Since everyone shares 50% of their genes with their siblings, if a homosexual helps their siblings' children survive to reproductive age, he would actually be propagating his own genes -- including his genes for homosexuality.
Another theory is that homosexuality is a peculiar occasional manifestation of another gene that normally has nothing to do with homosexuality, but which normally increases a person's chances of reproduction. There are genetic diseases that you only get if you have two copies of the defective gene, but if you have one copy of the defective gene, you actually are more likely to survive. For example, researchers believe that one copy of the gene for Tay-Sachs disease makes you more resistant to tuberculosis.
Why do I not believe homosexuality is genetic? Partly because the scientific studies asserting it's genetic haven't been replicated. Partly because a study involving identical twins indicated a 50% linkage (if you're a gay man with an identical twin brother, there's a 50% chance he's also gay) -- this shows a strong genetic component but clearly genes aren't controlling. But one big reason I don't believe in a genetic cause is that the alternative psychological theories (early sexual trauma, absent father, etc.) are more predictive of homosexuality. For example, a study showed that 75% of boys identified as sissies became gay men in adulthood. Also, I have read that youngest brothers are more likely to turn out gay.
Acually it's less than 50%. Some better studies were done - you may find this article very intersting: The Importance of Twin Studies.