A friend of Dorothy or FOD is someone who identifies as homosexual or queer; the term can encompass a range of people in the queer community, from transsexuals to asexuals. This euphemism came into common use in the gay community in the middle of the 20th century, when people needed to be discreet about their sexual orientation. Although the gay community is increasingly "out" today, the term endures, especially to describe closeted people in the queer community.
There are several theories for the origins of this term. The most likely reason is that it is named for Dorothy Parker (1893 - 1967), a famous gay rights ally and icon who inspired a variety of slang terms within the queer community. Parker's witty, trenchant writing was often littered with euphemisms which were later adopted by the gay community, making it easy for people to identify each other without explicitly stating their orientation. People have been describing themselves as friends of Dorothy since the 1930s, lending credence to this theory.
Others link the term to Judy Garland, who played Dorothy in The Wizard of Oz. Garland herself was quite an icon in the gay community, and the character of Dorothy is often noted for her acceptance of diversity and differences. Furthermore, a rather effeminate character in the movie, the Cowardly Lion, identifies himself as a “friend of Dorothy,” although he was of course referring to the character, not to his sexual orientation.
The use of this phrase as a codeword for homosexuality exploded in the 1940s, along with terms like Mary, Nelly, and Mrs. King to describe people in the queer community. Widespread awareness of the hidden meaning of the term didn't arise until the 1980s, when the gay community became much more prominent in many societies, and the term is still sometimes used as a euphemism; on cruise ships, for example, a gay-friendly gathering might be identified as a “meeting of friends of Dorothy” or an “FOD meeting.”
Some people who consider themselves queer allies may also call themselves friends of Dorothy, even if they do not identify as queer themselves. Of course, for people who are actually named Dorothy, the double-entendre involved in describing oneself as a FOD must be extremely frustrating.