>>14400277A gene which straightforwardly made you gay would get quickly selected out of the population. That's why there's no such gene and being born gay is a side-effect of things that are usually beneficial, such as your mother having a strong immune system or a gene which improves fertility in women.
I suspect that the selection against transness is weaker.