At what point in American history was the word "gay" associated with being homosexual?

by Supreme_Ocelot

A lot of music from way back when uses the term gay to describe being happy, but now if you were to do so it would have a completely different meaning. I'm wondering when and why this change occurred.

KUmitch

Here's an entry from the Online Etymology Dictionary.

The first pertinent section:

Slang meaning "homosexual" (adj.) begins to appear in psychological writing late 1940s, evidently picked up from gay slang and not always easily distinguished from the older sense

They provide this quote:

After discharge A.Z. lived for some time at home. He was not happy at the farm and went to a Western city where he associated with a homosexual crowd, being "gay," and wearing female clothes and makeup. He always wished others would make advances to him. ["Rorschach Research Exchange and Journal of Projective Techniques," 1947, p.240]

Later, they make reference to the Dictionary of American Slang:

The "Dictionary of American Slang" reports that gay (adj.) was used by homosexuals, among themselves, in this sense since at least 1920. Rawson ["Wicked Words"] notes a male prostitute using gay in reference to male homosexuals (but also to female prostitutes) in London's notorious Cleveland Street Scandal of 1889. Ayto ["20th Century Words"] calls attention to the ambiguous use of the word in the 1868 song "The Gay Young Clerk in the Dry Goods Store," by U.S. female impersonator Will S. Hays, but the word evidently was not popularly felt in this sense by wider society until the 1950s at the earliest.

And one last quote from the entry:

"Gay" (or "gai") is now widely used in French, Dutch, Danish, Japanese, Swedish, and Catalan with the same sense as the English. It is coming into use in Germany and among the English-speaking upper classes of many cosmopolitan areas in other countries. [John Boswell, "Christianity, Social Tolerance, and Homosexuality," 1980]

Hope this source is sufficient, if it's not enough I'll happily delete it.