Jukebox musicals tend to go one of two ways. Either they tell the basic story of the stars they’re meant to salute (like Jersey Boys and Frankie Valli and the Four Seasons, or Summer and Donna Summer). Or they invent some tale out of whole cloth (à la Mamma Mia! and Abba, or We Will Rock You and Queen).

As loony as the latter can get, the premise of a new Broadway musical, based on the DayGlo songs of the Go-Go’s, hits a gobsmacking new high. It transposes the band’s 1980s power-pop touchstones to the world of 1580, borrowing the storyline from an impenetrable Tudor-era poem, while aping the arch rhythmic patterns of iambic pentameter.

“It’s not an obvious connection,” said the play’s director, Michael Mayer. “It’s something more imaginative. We’re trying to break new ground here.”

In fact, they’re doing so on several levels. Though the play, titled after the Go-Go’s effervescent top 20 hit Head Over Heels, strikes a consistently giddy tone, beneath the froth it tackles a meaty range of issues, many of them concerning gender. In the manner of the Shakespearean plays it references, it features lots of cross-dressing, as well as mistaken identities which, here, are used to screw with any binary notions of sexuality. A pivotal character, the Oracle of Delphi, is played by Peppermint, the first transgender woman to originate a major role in a Broadway musical. Her character chooses to be referred to as “they”, inspiring a song that’s probably the first in a commercial musical to use that pronoun to refer to an individual. More whimsically, this has to be the first musical to feature a line like “thou better workest”, an imagined 16th-century twist on RuPaul’s famous catch-phrase “you better work”.

“This play is full of firsts,” said Mayer.

Head Over Heels tackles more than just gender norms. It challenges classism, monarchism, sexism, elitism, superficiality, masculinity and more. “It’s got all the isms,” Peppermint said. “But for every issue it takes on, there are 10 or 20 laughs.”

Jane Wiedlin of the Go-Go’s said it was important to the band that the play’s tone stay light. “Our music has always brought people joy,” she said. “The musical needed to do the same.”

It also needed to avoid telling the band’s own story. “We weren’t at all interested in that approach,” Wiedlin said. “That would be fraught with pitfalls and insecurities and possible hurt feelings. Also, it’s really hard to tell a 40-year story of five different people and get it right.”

Jeff Whitty, creator of the inventive hit play Avenue Q, had the task of creating a book, and a focus, for the show. Taking the greatest possible leap, he chose to base his story on the 16th-century poetic work The Countess of Pembroke’s Arcadia written by Sir Philip Sidney. “I thought, ‘What if I make a great work of art, not just a jukebox musical?’” Whitty said. “The Go-Go’s will be elevated in the process and people will be able to listen to them with a new ear.”

Originally, his version didn’t use iambic pentameter, but he discovered that employing the verse made his lengthy script “shorter, cleaner and clearer”, he said.

The band enthusiastically approved Whitty’s eccentric script and that version had its premiere at the Oregon Shakespeare festival in 2015. But between that time and the show’s pre-Broadway try-out in San Francisco in April, a significant controversy arose. The production brought in a new director, Michael Mayer, who had earlier guided the hit Broadway rock musicals Spring Awakening, American Idiot, and Hedwig and the Angry Inch. And he wanted to make significant changes. In the process, Whitty felt he was “being asked to do something impossible” – to put “Humpty Dumpty back together again”, he said. “I couldn’t oversee the destruction of all that had worked so well.”

Consequently, Whitty decided to resign, and though he retains credit for the original book, it was adapted, and significantly altered, by James Magruder. Mayer and Wiedlin each praised Whitty’s talents, but the originator of the book remains deeply disappointed by the reworking. He said he considered the Broadway version “shallower” and its language untrue to the tenets of iambic pentameter.

Peppermint and the ensemble of Head Over Heels. Photograph: Joan Marcus

The Broadway version also changes the role of some key characters from Whitty’s script. But it honors his determination to put lesbian characters at its center. “I’m so tired of seeing just gay men on the Broadway stage over the years,” Whitty said. “I thought: ‘Give us a musical comedy’s first leading lesbians.’”

Both versions of the play celebrate women of size. “It’s an opportunity to see big beautiful women out there who aren’t a joke,” Mayer said. “In our story, she’s the epitome of beauty.”

Wiedlin draws a clear connection between the play’s gender politics and the Go-Go’s own history. “Our whole lives, we’ve been connected with the LGBTQ communities,” she said. “And they’ve always been very supportive of the band.”

The group even appeared as “drag kings” in their 1984 video for Turn To You. “We looked like young Beatle boys,” she said.

Peppermint has her own connection to the band. In 2012, she sang backup for Belinda Carlisle at a show in New England. “I was a makeshift drag Go-Go,” she said.

While Peppermint has appeared in films, TV (including RuPaul’s Drag Race) and in her own music videos, her Broadway debut signifies something special. “It means that maybe the doors are finally opening at least wide enough for someone of my size to get through,” she said, with a laugh. “There was definitely a time when I auditioned for projects when I was encouraged to hide some of the signifiers that I was trans. The very things that give me flair as a performer were looked down upon. Even now, trans women of color haven’t had their lives celebrated in the way that, I believe, is happening in this project.”

Along with exposing fresh issues for Broadway, the play gives an airing to some lesser known Go-Go’s songs, amid the hits. “The best thing for me,” Wiedlin said, “is that some of these songs most people have never heard of” – like Here You Are, from the 2001 album God Bless the Go-Go’s, or Good Girl, which was released on a compilation album in 1994.

The end of the show features a “big reveal” that dovetails with the Go-Go’s role as the first female band who play all their own instruments and write all their own songs to score a No 1 album. “We want to help with any opportunity to have female musicians onstage,” Wiedlin said.

Together, she believes, the messages the show sends are well suited the times. “All the strides we’ve made towards equality have been slipping away lately,” she said. “Now, more than ever, we need to give people hope and happiness – at least for a couple of hours.”