In the late 20th and 21st Century people have a fairly specific concept of gay or queer culture, even if the aspects of it vary between cultural and temporal contexts.
And as part of that when did homosexuality first become the cornerstone of a gay identity in a modern sense of the term and was it anyway connected to increasing or decreasing tolerance or perhaps awareness of homosexuality in the 20th Century. Basically, I say "Modern ideas around sexuality and gender are not universal social constructs" or some such all the time as a way to brush off conversations about homosexuality in X culture but I have absolutely no idea how, when or why this modern understanding began to take form except a vague idea of Western Europe/US in the 20th Century. Please enlighten me.
For obvious reasons I am narrowing this down to North America and Europe (using the term narrow loosely here) and specifically asking for the origins and evolutions of it as a concept. Did the gay community (if the term is applicable) resist labelling altogether, did they accept it as a means of validation and recognition, was it at first a purely negative connotation that was being applied or is it all a lot more complicated than that?
J. Todd Ormsbee has a book, The Meaning of Gay: Interaction, Publicity, and Community among Homosexual Men in 1960s San Francisco, which works to give a account of precisely what you're asking by looking at the public discussions occurring between people in San Francisco during the 1960s, before there was what was broadly recognizable "gay community."
What particularly surprised me in his book was how seriously many writers took the notion that sex and sexuality was political. In so many words, they seemed to follow a similar line of thought comparable to feminism in the 1960s---that "liberation" meant a radical departure from "normal" ways of doing things. He finds in local publications and community discourse a lot of questions that asked seriously what does gay mean? (Hence the title.) The term "gay" back then that I think that is more related to contemporary "queer." For some writers, having same-sex sex or even same-sex sexual attractions was not simply necessary to be gay. Gay could mean men and women to "threw off" marriage, child rearing, monogamy, etc. In so many words, "gay" in the 1960s was about questioning and challenging heteronormativity.
While some writers and community members at the time were interested in expanding the abstract sense of "gay," there was certainly a lot about being gay that was closely connected to homosexuality. For example, the idea that gay was about challenging or objecting to norms of sex and marriage occurred for many men and women because they pursued intimate and professional lives that were in conflict with heterosexual culture. Homosexual men and women were labeled as mentally ill, had been cast out by their families, and were marginalized. So for a lot of people, having certain desires or being homosexual was enough to "push" them into being gay. So, as mentioned above, homosexuality did not seem sufficient or necessary to be "gay," but there were a lot of people in the community that could be called "homosexual" in one sense or another.
In so many words, Ormsbee observers that the community was engaged in a project of giving people more options and choices in intimate and social relations that in turn meant continually working to expand and improvise new forms of interpersonal connection. Gay-ness during this period was flexible and open, because it was about finding sorts of commonality that gave political power and community.
Now, I don't have my copy of The Meaning of Gay with me, but I believe that Ormsbee (and also scholars like David Halperin) find that the changes in the 1970s, towards a more homosexuality oriented "gayness" occurred in part because of the successes of 1960s gay community formation. One of the major questions Ormsbee finds the budding community asking is whether what they have going on (sexual liberation, feminism, legal and cultural battles for recognition) is enough to make "gay" a coherent political bloc. And the answer, I believe, is that it that there were emerging real differences in some kinds of politics and goals of non-straight people. We find that there starts to be whispers of "gay marriage"---whereas before much of the community was focused on the radical prospect of "overthrowing" marriage as an organizing (and hegemonic) part of life. We also have community leaders that then go on to enter mainstream society as business leaders or politicians---and so their connections to radical and grassroots community stuff becomes more tenuous (can you be radical in a suit and tie?). Basically, like how we see with things like Log Cabin Republicans in the 90s, being "homosexual" made someone connected to the gay community and identity, but being gay doesn't ensure political solidarity.
Now, I think that the other half of the question is about the "modern sense" of being gay. And I have two takes on it. First, I am actually not sure that homosexuality is the cornerstone of being gay. Or to put another way, I think that homosexuality has been displaced by "gay." There was this ethnography I read a while ago^1 that found that generational cohorts had various different affinities to being identified as "homosexual," and what the author(s) found out was that for a significant portion of post-1970s non-heterosexual men, they either shied away from "homosexual" as identity or rebuked it. In general, the sense that "homosexual" is a clinical or psychiatric designation doesn't sit well with "older" gay men and some college-age gay men. So to put it directly: I actually doubt that the modern meaning of gay is "homosexual."
Second, I do think we can say that gay certainly means strongly something in terms of sexuality. Though this is a very real place for historical debate, I place the centering gayness on same-sex sexuality around 1980s---including the HIV/AIDS pandemic. To make it short, because this answer is getting long and I am worried about getting rabbley (...), the way that political representation converged with the very public catastrophe of HIV brought into stark focus the sexual lives of gay men (and women!), especially those who were afflicted with HIV/AIDS. And epidemiological discourse used (fruitfully or violently) the boundaries of the gay community to "target" their research and interventions. So the combined technical treatment of non-heterosexuality with the very public exposure of HIV as a national crisis tightly wove together the notion of "gay" with a revitalized clinical understanding of "homosexuality." (let me put together a few sources for this last part, but I know Catherine Waldby's AIDS and the Body Politic was the text that introduced me to this way of thinking about HIV and identity in the 1980s forward).
EDIT: So to slightly expand on the point made the the last paragraph: the political goal of expanding options and possibility that was occuring in the 1960s and seemed to be thriving in the 1970s, meant that when the HIV/AIDS crisis struck in the 1980s, that very openness and freedom was quickly identified as the "cause" of HIV/AIDS. That is to say, American epidemiologists when looking at abnormal cases of Kaposi's sarcoma (KS)---that were later found to be caused by immunodeficiency---began making speculative lists of factors that caused or created risk of disease. Researchers at the CDC were quick to seize on those things about the KS patients that were the most "abnormal"---specifically, gay sex and the things that were associated with the gay community. A number of hypothesis were proposed, and suddenly not just sex, but things that seemed to be unique to gay sex were being investigated. One good example of a path taken, but eventually unsubstantiated, is the use of amyl nitrate (poppers). Survey's found it was a popular drug among gay men, and the first characteristic patients reported use of poppers. This and a number of other "factors" began to populate the list of AIDS causes. As Gerald Oppenheimer points out, the papers published in 1981 were mainly surveillance reports, and these were used to define what would constitute a "case." Remember, The virus wasn't "known" until 1983, and serological tests would come later. Thus, for the first years of the public epidemic, clinical and epidemiological sources were the material that made up knowledge of HIV, and because the strong focus on bodies (sexual and social activity) and networks (the gay community), HIV/AIDS was one of the most highlighted intersection of public concern and media reporting.
Here are some of the secondary literature on the epidemiological construction of sexuality and disease risk:
Oppenheimer, G. "In the Eye of the Storm: The Epidemiological Construction of AIDS" in AIDS: The Burdens of History, Daniel M. Fox and Elizabeth Fee, editors, University of California Press, 1988.
--- --- --- "Causes, Cases and Cohorts: The Role of Epidemiology in the Historical Construction of AIDS, 1980-1989" in AIDS: The Making of a Chronic Disease, Elizabeth Fee and Daniel M. Fox, editors, University of California Press, 1991.
Young, Rebecca M., and Ilan H. Meyer. “The Trouble With ‘MSM’ and ‘WSW’: Erasure of the Sexual-Minority Person in Public Health Discourse.” American Journal of Public Health 95 (2005): 1144–1149.
^1 As for the ethnography on sexuality and identity, I am having a hell of a time finding it. I read it and cited it in my undergraduate capstone thesis, but I can't find it on any of my storage devices. The rundown of the study (if my memory serves me well) is this: the authors found that the oldest cohort, those who had been engaged in "homosexual activity" prior to the liberation discourse of the 60s, were the most likely to readily identify as "homosexual." However, in interviews, the narrative of their sexual life was one of secrets and abjection---they sought sex with other men in secret, and kept this part of their life hidden from family and friends. The next oldest cohort, "children" of the 60s and 70s liberal/radical movements were the most likely to rebuke "homosexual" identity. These people saw themselves as "gay," not "homosexual," because the latter category was stigmatizing and clinical. The remaining cohorts were, to various degrees, ambivalent or opposed to the "homosexual" identity---these men identified as gay or queer, but typically never reached for "homosexual," as the sense of its stigma wasn't gone, but the consciousness of it was less articulate.