‘Molly”, “Uranian”, “intermediate type”, “LGBT”. The changing words used by gay people to describe each other can be read as a kind of history in themselves. Their evolution from social to psychological to political categories mirrors changes in the real-life experience of sexual nonconformity. Side by side are the insults thrown by the majority: “sodomite”, “queer”, “invert”, “degenerate”, some of which betray the influence of prevailing religious or medical attitudes. As ever, culture leaves its imprint on language. So where are we now? Is “LGBTQQI” the natural end point in a story of emancipation, where everyone is free to express their sexuality and identity as they like?

Coming Out by Jeffrey Weeks tries to take the long view. A “history of LGBT identities in Britain from the 19th century to the present”, it was first published in 1977, in a decade when Dennis Altman prophesied “the end of the homosexual” – a world where being gay or straight wouldn’t matter. A second edition in 1990 took in the Aids crisis, and this version, with a new foreword and postscript, brings us up to date.

The action begins in the late 19th century, with an unprecedented entwining of law and sexual morality. It’s hard to be certain why this happened: Weeks offers up the “grappling for control” by central government in an era of mass urbanisation, industrial capitalism and potential disorder. The professionalisation of policing was another factor. Whatever the causes, gay men (the law ignored lesbians) faced unprecedented dangers. The Labouchère amendment to the 1885 Criminal Law Act introduced the offence of gross indecency, punishable by hard labour. It did for both Oscar Wilde and, 50 years later, Alan Turing. It was on the statute books until 2003.

Facebook Twitter Pinterest A portrait of Oscar Wilde in a cell at Reading prison, where he was incarcerated for indecency. Photograph: Eddie Keogh/Reuters

In this context, the life and work of someone such as Edward Carpenter is extraordinary. Born in 1844 in comfortable circumstances in Brighton, he had become, by the 1890s, a radical socialist, gay mystic, a “prophet” to some, with poetry, political writings and countless public speeches to his name. Weeks describes how the cottage in Derbyshire where he lived with his working-class boyfriend, George Merrill, became a mecca for “vegetarians, dress-reformers, temperance orators, spiritualists, secularists, anti-vivisectionists”. A former lover, George Hukin, recounts that one day “two very pretty young ladies turned up with a donkey and cart and a dog. They had come all the way from Essex with bare feet and sandals … they said they were pilgrims”.

While providing a model for gay life, and alluding to it in unmistakable ways in his writing, Carpenter had to be circumspect. He trod a careful line in a response to reviews of his 1908 book The Intermediate Sex: A Study of Some Transitional Types of Men and Women: “I am certain there is not a single passage … where I advocate sexual intercourse of any kind between those of the same sex. I advocate sincere attachment and warm friendship.”

After New York's Stonewall riots, there was a new spirit of truculence as the 70s rolled in

Despite these limitations, Carpenter’s vision was influential in an era where most expressions of hope for sexual freedom were idealistic, literary or couched in scientific terms. He was part of a milieu that included the novelists EM Forster and Radclyffe Hall and the sexologist Havelock Ellis. As the century wore on, these currents gave way to more technocratic attempts to effect legislative change. The Homosexual Law Reform Society (HLRS) was founded in 1958, after the publication of the Wolfenden report, which recommended the decriminalisation of gay sex, but still a decade away from decriminalisation itself. As a project to convince parliament and society of the need for a new approach, it was respectable to a T. The HLRS argued that its mission was vital, “for reasons of justice, security, public health” – a slogan with nods to the risks of both blackmail and venereal disease. For now, the case for change had to be based on something other than “gay pride”.

The fact that, post-decriminalisation, prosecutions for gross indecency actually increased, combined with the example set by the Stonewall riots in New York in 1969, meant that as the 70s rolled in a new spirit of truculence emerged. With the formation of the Gay Liberation Front, some gay men and women decided to stop apologising for themselves, to abandon being as discreet and decorous as possible in order to win allies. Instead there were new forms of protest like rowdy “zappings”, which targeted homophobic institutions or people, “gay-ins” and pride marches. Though small in scale (Weeks says that around 2,000 attended the first gay pride march in 1971), it was a paradigm shift that probably had more effect on gay people’s sense of themselves than decades of quiet lobbying.

Facebook Twitter Pinterest A woman wears a Stonewall T-shirt at Pride in London in 2008. Photograph: Peter Marshall/Alamy

Weeks was an activist in the 70s, not merely an observer, and has been criticised as promoting a gay “end of history” argument – something that might look naive in the light of today’s proliferation of both freedom and reaction. He addresses this in the foreword: “Although I certainly believed that the new identities did represent an advance on the closeted and often persecuted identities that came before, I did not believe that there was anything automatic about their emergence – after all, this book is in large part a history of struggle, which by its nature goes in many, often divergent directions.” As for today’s alphabet soup of Qs and Gs and Is: “Nor did I think that lesbian and gay identities, themselves very varied, exhausted all other possibilities, and where we had got to in the 1970s was where we wanted to be.”

The book has its flaws. The sweep and ambition are impressive but the texture is uneven. The pre-1967 chapters comprise skilled, enjoyable history writing in a fairly conventional mould. By the 70s, however, Weeks’ own history in the gay liberation movement subtly directs his attention. A hurried look at the 80s, and the brevity of the more recent postscript add to a sense of lopsidedness.

More problematically, the short passages on attempts by advocates of child abuse to ally with the gay movement come across as too equivocal. Weeks writes, “Libertarians asked: if an encounter between a child and adult was consensual and mutually pleasurable, in what way could or should it be deemed harmful? This led on to questions of what constituted harm, what was consent … These were real questions which had to be faced if any rational approach was to emerge, but too often they were swept away in a tide of revulsion.” It is discomfiting that Weeks doesn’t make it clearer these arguments fail because no child can “consent” to sexual activity.

Despite the efforts to update it, Coming Out retains the flavour of a period piece, albeit a significant one. For a record of contemporary gay life, I suspect we’ll have to wait until those now making it are ready to commit their own histories to paper.

• To order Coming Out for £12.29 (RRP £14.99) go to bookshop.theguardian.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99.