in 1857 illustrating the use of "gay" as a
for being a prostitute.
One woman says to the other (who looks glum), "How long have you been gay?" The poster on the wall is for
, an opera about a courtesan.
The word gay arrived in English during the 12th century from
Old French gai, most likely deriving ultimately from a
 In English, the word's primary meaning was "joyful", "carefree", "bright and showy", and the word was very commonly used with this meaning in speech and literature. For example, the
optimistic 1890s are still often referred to as the
Gay Nineties. The title of the 1938 French
Gaîté Parisienne ("Parisian Gaiety"), which became the 1941
Warner Brothers movie,
The Gay Parisian,
 also illustrates this connotation. It was apparently not until the 20th century that the word began to be used to mean specifically "homosexual", although it had earlier acquired sexual connotations.
The derived abstract noun
gaiety remains largely free of sexual connotations and has, in the past, been used in the names of places of entertainment; for example W.B. Yeats heard Oscar Wilde lecture at the
Gaiety Theatre in Dublin.
The word may have started to acquire associations of immorality as early as the 14th century, but had certainly acquired them by the 17th.
 By the late 17th century it had acquired the specific meaning of "addicted to pleasures and dissipations",
 an extension of its primary meaning of "carefree" implying "uninhibited by moral constraints". A gay woman was a
prostitute, a gay man a womanizer, and a gay house a
 The use of gay to mean "homosexual" was often an extension of its application to prostitution: a gay boy was a young man or boy serving male clients.
 Similarly, a gay cat was a young male apprenticed to an older
hobo, commonly exchanging sex and other services for protection and tutelage.
 The application to homosexuality was also an extension of the word's sexualized connotation of "carefree and uninhibited", which implied a willingness to disregard conventional or respectable sexual mores. Such usage, documented as early as the 1920s, was likely present before the 20th century,
 although it was initially more commonly used to imply heterosexually unconstrained lifestyles, as in the once-common phrase "
 or in the title of the book and film
The Gay Falcon (1941), which concerns a womanizing detective whose first name is "Gay". Similarly, Fred Gilbert and
G. H. MacDermott's
music hall song of the 1880s, "Charlie Dilke Upset the Milk" – "Master Dilke upset the milk/When taking it home to Chelsea;/ The papers say that Charlie's gay/Rather a wilful wag!" – referred to Sir
Charles Dilke's alleged heterosexual impropriety.
 Giving testimony in court in 1889, the rentboy
John Saul stated: "I occasionally do odd-jobs for different gay people."
 Well into the mid 20th century a middle-aged bachelor could be described as "gay", indicating that he was unattached and therefore free, without any implication of homosexuality. This usage could apply to women too. The British comic strip
Jane, first published in the 1930s, described the adventures of Jane Gay. Far from implying homosexuality, it referred to her free-wheeling lifestyle with plenty of boyfriends (while also punning on
Lady Jane Grey).
A passage from
Gertrude Stein's Miss Furr & Miss Skeene (1922) is possibly the first traceable published use of the word to refer to a homosexual relationship. According to Linda Wagner-Martin (Favored Strangers: Gertrude Stein and her Family (1995)) the portrait "featured the sly repetition of the word gay, used with sexual intent for one of the first times in linguistic history," and
Edmund Wilson (1951, quoted by James Mellow in Charmed Circle (1974)) agreed.
 For example:
They were ... gay, they learned little things that are things in being gay, ... they were quite regularly gay.
— Gertrude Stein, 1922
The word continued to be used with the dominant meaning of "carefree", as evidenced by the title of
The Gay Divorcee (1934), a musical film about a heterosexual couple.
Bringing Up Baby (1938) was the first film to use the word gay in apparent reference to homosexuality. In a scene in which the
Cary Grant character's clothes have been sent to the cleaners, he is forced to wear a woman’s feather-trimmed robe. When another character asks about his robe, he responds, "Because I just went gay all of a sudden!" Since this was a mainstream film at a time when the use of the word to refer to
cross-dressing (and, by extension, homosexuality) would still be unfamiliar to most film-goers, the line can also be interpreted to mean, "I just decided to do something frivolous."
In 1950, the earliest reference found to date for the word gay as a self-described name for homosexuals comes from Alfred A. Gross, executive secretary for the George W. Henry Foundation, who said in the June 1950 issue of SIR magazine: “I have yet to meet a happy homosexual. They have a way of describing themselves as gay but the term is a misnomer. Those who are habitues of the bars frequented by others of the kind, are about the saddest people I’ve ever seen.”
Shift to specifically homosexual
By the mid-20th century, gay was well established in reference to hedonistic and uninhibited lifestyles
 and its antonym straight, which had long had connotations of seriousness, respectability, and conventionality, had now acquired specific connotations of heterosexuality.
 In the case of gay, other connotations of frivolousness and showiness in dress ("gay apparel") led to association with
effeminacy. This association no doubt helped the gradual narrowing in scope of the term towards its current dominant meaning, which was at first confined to subcultures. Gay was the preferred term since other terms, such as
queer, were felt to be derogatory.
Homosexual is perceived as excessively clinical,
 since the sexual orientation now commonly referred to as "homosexuality" was at that time a mental illness diagnosis in the
Diagnostic and Statistical Manual of Mental Disorders (DSM).
In mid-20th century Britain, where male homosexuality was illegal until the
Sexual Offences Act 1967, to openly identify someone as homosexual was considered very offensive and an accusation of serious criminal activity. Additionally, none of the words describing any aspect of homosexuality were considered suitable for polite society. Consequently, a number of euphemisms were used to hint at suspected homosexuality. Examples include "sporty" girls and "artistic" boys,
 all with the stress deliberately on the otherwise completely innocent adjective.
The sixties marked the transition in the predominant meaning of the word gay from that of "carefree" to the current "homosexual".
In the British comedy-drama film
Light Up the Sky! (1960), directed by
Lewis Gilbert, about the antics of a British Army searchlight squad during World War II, there is a scene in the mess hut where the character played by
Benny Hill proposes an after-dinner toast. He begins, "I'd like to propose..." at which point a fellow diner, played by
Sidney Tafler, interjects "Who to?", suggesting a proposal of marriage. The Benny Hill character responds, "Not to you for start, you ain't my type". He then adds in mock doubt, "Oh, I don't know, you're rather gay on the quiet."
By 1963, a new sense of the word gay was known well enough to be used by
Albert Ellis in his book The Intelligent Woman's Guide to Man-Hunting. Similarly,
Hubert Selby, Jr. in his 1964 novel
Last Exit to Brooklyn, could write that a character "took pride in being a homosexual by feeling intellectually and esthetically superior to those (especially women) who weren't gay...."
 Later examples of the original meaning of the word being used in popular culture include the theme song to the 1960–1966 animated TV series
The Flintstones, whereby viewers are assured that they will "have a gay old time." Similarly, the 1966
Herman's Hermits song "
No Milk Today", which became a Top 10 hit in the UK and a
Top 40 hit in the U.S., included the lyric "No milk today, it was not always so / The company was gay, we'd turn night into day."
 In June 1967, the headline of the review of the Beatles'
Sgt. Pepper's Lonely Hearts Club Band album in the British daily newspaper
The Times stated, "The Beatles revive hopes of progress in pop music with their gay new LP".
 Yet in the same year,
The Kinks recorded "David Watts".
 Ostensibly about schoolboy envy, the song also operated as an in-joke, as related in Jon Savage's "The Kinks: The Official Biography", because the song took its name from a homosexual promoter they'd encountered who'd had romantic designs on songwriter
Ray Davies' teenage brother; and the lines "he is so gay and fancy free" attest to the ambiguity of the word's meaning at that time, with the second meaning evident only for those in the know.
 As late as 1970, the first episode of
The Mary Tyler Moore Show has the demonstrably straight Mary Richards' downstairs neighbor, Phyllis, breezily declaiming that Mary is, at age 30, still "young and gay."
There is little doubt that the homosexual sense is a development of the word's traditional meaning, as described above. It has nevertheless been claimed that gay stands for "Good As You", but there is no evidence for this: it is a
backronym created as