In popular culture, a gaydar is an intuitive sense to be able to detect gay people. It relies on stereotypical cues, and has some basis in science, but does not work when people do not conform to sterotypes.
Voices that are higher and more melodious are more often labelled gay. This voice, which is more stereotypically feminine, is most likely imprinted from females that the person was influenced by, like parents and friends.
People can code-switch, which is subconciously slipping into another accent when they are with a different group of people.