Dante
"The Libido for the Ugly"
Not a single gene, but if enough of them get turned from boy to girl (and you'd started building boy parts), the result will be a dude with a lot of estrogen and other traits.
Incidentally, the brain of a male straight and a male gay are very different. The gay males' brain is wired like a female straights brain.
at birth or later? I heard environment and behavior shapes much that is being measured.

there are switches and makers in an infant's genetic make up that are open -- not set in stone.
think: predispositions to specific diseases that run in a family.