In 1995 Sarah Waters started writing a novel about a young woman who runs off to London, becomes a music hall star and falls in love with a girl in trousers. Twenty years later, here she is talking about the book and the role it has played in changing fact and fiction. There was a time, says Waters, when her tale of Victorian lesbian love was niche and novel, but not anymore. Something extraordinary has happened in gay culture – and mainstream culture too - and Tipping the Velvet has been right at the centre of it.

The latest incarnation of the book, a raucous, rowdy, uproarious stage version coming to the Lyceum in Edinburgh next week, proves the point. The original novel was published before gay marriage, before Queer as Folk, before gay characters were commonplace on soap operas and TV drama and at a time when lesbian fiction was a niche within a niche. But the stage version is happening after the rapid change of the last ten years or so, brought about in part by Tipping the Velvet. In 1995, Tipping the Velvet was remarkable; in 2015, the stage version is pretty much mainstream.

That does not mean it is conventional though – far from it. In fact, the play, which has been adapted from the book by the playwright Laura Wade, uses a whole range of tricks and flourishes to tell the story: there are puppets, there’s aerial work, there’s a music hall master of ceremonies and there are pop songs. It’s designed to be a bouncy, colourful, swirling mix of the historical and contemporary, just like the book.

The story follows Nan King, a poor girl from the Kentish coast who falls in love with a music hall male impersonator (or “masher” in the parlance of the day) called Kitty Butler. The pair become a double act, but after convention gets in the way and Kitty gets married, Nan drifts down into the Victorian gay underworld. Disguised in men’s clothes, she becomes a rent boy doing favours for gentlemen, then the live-in lover of a wealthy sapphist before becoming a Socialist campaigner and activist. It’s the story not only of coming out as gay and discovering a community, it is also the story of a teenager leaving home, falling in love for the first time, getting it wrong and then getting it right.

So how on earth do you turn that kind of novel into a stage play, particularly the more intimate sexual moments? Did Sarah Waters have any reservations about the idea when Sean Holmes, the artistic director of the Lyric in London first suggested it? Speaking over the phone from London, she says yes, she did have some reservations, but only in a way that made her curious to see how it would work. She had already been through the BBC television adaptation in 2002 and liked it, so she wondered how the theatre could do it differently.

One of the innovations in the new production is its use of pop songs, including Prince’s Kiss, Bronski Beat’s Smalltown Boy and Miley Cyrus’s Wrecking Ball. “It’s one of my favourite things about the production,” says Waters. “The TV was a relatively straight adaptation but I knew as soon as I started talking to Laura that she didn’t want to do it like that, and that, to me, made it more exciting. She has been very inventive, and has made the most of the theatricality of it.”

Laura Wade’s thinking in using modern music was to recreate what a Victorian music hall audience would have experienced. “We’ve used the form of Victorian music hall as an overall framework,” says Wade, “and in terms of the music, a Victorian music hall audience would have known the songs they were hearing and would be singing along with them and that was part of the experience for them. So we wanted to give our modern audience that same feeling of recognition by using modern songs and giving them a Victorian music hall twist.”

Wade (who is best known for her play Posh, which dramatised the goings-on at The Bullingdon Club at Oxford) also saw all the conventions of the music hall as a good way of telling all of Nan’s story.

“The way she falls in love with the theatre and Kitty at the same time awaken something in her that is quite performative, so she becomes a theatre person and even when she leaves the theatre, the way she approaches her life is performative. As a rent boy, she is trying on different characters and the story of the book, in our interpretation, is her finding her way to an authentic version of herself.”

It is this aspect of the story – the search for the authentic self - that makes it powerful for gay men and women. The details, atmosphere and attitudes of the story are Victorian, but Nan falling in love for the first time, and the second, and the third, her first experience of a gay bay and her experience of a Socialist rally which is a lot like Pride are all modern; the same now as then.

“My starting point writing the book,” says Wade, “was looking at what we knew about gay men in the 19th century, Oscar Wilde and rent boys. We have a fair bit of information on the way that gay men were using the streets so the book started as an act of appropriation in a way, with me taking those gay men’s details and turning them into a lesbian story.”

What she then did was quite deliberately introduce modern resonances – like the gay bar. “Which is why Laura’s approach really fits - she has taken this playful, anachronistic approach and in a way I was doing that in the book too. Because we don’t have much information about women’s lives in the 19th century, I felt I could kind of make things up but I wanted to make them up in a way that were clearly rooted in the present. So the pub scenes and the scene near the end of the book is at a big Socialist rally where she meets all her exes, it’s like Pride, quite deliberately. I really wanted there to be those modern resonances.”

In a funny way, though, despite all the modern tones and sounds, Tipping the Velvet has itself become a piece of history because the political landscape that existed when it was published is very different from the one that exists now.

“When I was writing it,” says Waters, “it wasn’t in any way a shocking book and there had certainly been lots of lesbian and gay writers before me doing similar things, but by the time it was adapted for TV in 2002, it did seem to be capturing a shift.

“In the 20 years since I started writing it, that’s exactly the time when so much has changed for lesbian and gay people in the UK in terms of parenting and marriage rights, so I think it was seen as a rather novel story when I first wrote it, but I don’t think it would be seen as novel now which just shows how far we’ve come. I think the fact that it crossed over in to mainstream was rather new.”

But even though we have come so far, there is still a way to go, as both Waters and Wade believe the portrayal of gay characters on stage, television and in novels still lags behind where it should be. There was a big gap, for example, between Tipping the Velvet and that other great lesbian novel, Jeanette Winterson’s Oranges are Not the Only Fruit, which was published in 1985, and Waters and Wade believe men’s stories still dominate popular culture, with gay men’s stories, and even more so gay women’s, somewhat pushed into the sidelines.

“Those stories are still less frequently represented on that stage and that’s something that still needs working on,” says Wade. “Stories generally about women are told a lot less often , whatever the sexuality.”

One positive Wade can see is the fact that the audiences she has seen coming to Tipping the Velvet at the Lyric are made up of a healthy mix of straight and gay people – gay stories, she thinks, are much more mainstream than they used to be.

“Obviously, it’s a hugely important book for the lesbian readership,” says Wade. “But I know a lot of straight women as well, and plenty of men in fact, who have really taken to the book. It’s about youth and discovery and it’s a bloody good story.”

Tipping the Velvet is at Royal Lyceum Theatre, Edinburgh from Wednesday 28 October – Saturday 14 November 2015