I already said prenatal hormones people. But that couldn't be a sufficient answer since identical twins are more likely to share a common sexual orientation than fraternal twins.
Anyway, through kin selection homosexuals wouldn't necessarily need to reproduce to pass on their genes. By aiding siblings (who share 50% of their genes) or cousins (25%) they could help aid their survival and reproduction. So if their siblings carried an inactivated gay gene (not saying it works like this) they could help that gene live on without directly reproducing.
Also researchers who believe that genes are involved think the genes are passed on from heterosexual mothers. So gay men wouldn’t need to have children for there to be "gay genes".