The photographer is anonymous, as are the subjects who are captured illicitly standing on street corners in and around Times Square in the 1960s, gingerly—and not so gingerly—cruising each other.

One man stands sexily—tight clothes, sharp haircut—being observed by a man in a longer coat. Another tall, slim man strides in black T-shirt and black trousers, and then there is the male couple photographed from the back, arms around each other’s waists, standing on the street corner as city life buzzes about them.

The New York Times at the time noted the “decay” of 42nd Street, and that homosexuality was “an obvious problem.”

Back then there was no Grindr, and while there were gay bars, you had to have the courage to search them out and go inside. Cruising on the street was still the most immediate, if risky, way to meet men, and scanning the strip of black-and-white photographs in the opening room of Gay Gotham: Art and Underground Culture in New York at the Museum of the City of New York, one sees a furtive microcosm of gay desire being played out in public long before our era of equality.

This exhibition, brilliantly curated by Donald Albrecht, MCNY’s curator of architecture and design, and Stephen Vider, MCNY Mellon postdoctoral fellow, is full of such jewels and curios.

It contains 225 pieces of art, is spread across two galleries, and looks at the work of a range of LGBT artists and cultural tastemakers in the city from the 1910s to the mid-1990s, spanning art, literature, music, and dance. It is thematically arranged around “place-making,” “posing,” “performing,” and “printing.”

Some of the names are familiar, many, refreshingly, are not. They cross age, race, gender identity, and all their presences feel the very opposite of tokenistic because of their bravery, individuality, and valuable contributions to our culture. It is not an encyclopedic history, it is not definitive (and you may have read much of the information elsewhere), but collected together this is a fascinating, informed bran-tub and treasure hunt.

The exhibition shows—as its sources, like George Chauncey’s book Gay New York, did—that New York’s LGBT cultural and social universe is far from a modern invention.

Visitors to the first room are first greeted by a video showing elements of LGBT history from the 1920s, like the “pansy craze” of effeminate male performers—chief among them Gene Malin.

This first room features art from the 1910s to 1960s, and the work of Leonard Bernstein, George Platt Lynes, Mercedes de Acosta, Lincoln Kirstein, and Richard Bruce Nugent.

The yearning chorus of “Somewhere” floats above the 1920s music as a ghostly soundtrack as you survey the costume designs for the original stage production of Bernstein’s West Side Story, and a picture of Bernstein with Jerome Robbins, Stephen Sondheim, and Arthur Laurents talking and laughing at a rehearsal. (Bernstein was married, though was “just gay,” he said.) A copy of Bernstein’s copy of Romeo and Juliet includes his annotated belief Shakespeare’s play is about racial discord.

The aim of the curators is to show the interconnectedness—professional, personal, sexual, non-sexual—between many of the artists. The photography of George Platt Lynes includes a portrait of a fully clothed W. Somerset Maugham, with a handsome, seemingly nude male model beside him: a gay subtext writ large. Lynes photographs E.M. Forster and his longtime partner, the policeman Robert (Bob) Buckingham, and your heart leaps to see the men together, because you recall Forster’s famous insistence that his landmark gay-themed novel Maurice (later made into a Merchant-Ivory movie starring Hugh Grant) not be published until after his death.

The work of the impresario Kirstein, who created the Ballet Caravan company in 1936, is linked to Aaron Copland, Paul Cadmus, and Virgil Thomson.

Nugent, one of the forbears of the Harlem Renaissance, collaborated with Langston Hughes and Zora Neale Hurston, and on a special phone you can listen to a number of his poems read beautifully by Rodney Evans.

When we come to Mercedes de Acosta, the first card heralds a quote from Alice B. Toklas: “Say what you will about Mercedes, she’s had the most important woman of the 20th century”—who included, most famously, Greta Garbo and Marlene Dietrich.

Here, the curators not only include a portrait of de Acosta in chic, proto-butch garb painted by her one-time husband Abram Poole, but also letters from one of her lovers, the actress Eva La Gallienne.

This first room isn’t just devoted to the work and legacy of cultural figures figures, but also contains a map of Greenwich Village showing the famous salons (like Mabel Dodge’s) and cafes and bars in Greenwich Village and Harlem where gays and lesbians gathered with varying degrees of openness--sometimes at drag balls, the early prototype for today’s gay club.

Each card comes with an illuminating potted history of the venue, so you imagine all the people, lives, and experiences that flowed through each place. Imagine the Hot-Cha Bar and Grill in Harlem, where Billie Holiday herself was discovered.

The artist Charles Demuth both painted and enjoyed the sexual pleasures of the Lafayette Baths. There is a case of Ann Bannon’s late ’50s-early ’60s pulpy lesbian novels, with titles like Odd Girl Out and Women in the Shadows.

In the 1920s, there was a gossipy freesheet called “Broadway Brevities,” and then the muscle magazines of the 1950s and 1960s, like The Young Physique and Muscleboy, which was gay porn coded with the bright, sunny face of healthy living. The exhibition charts the origins of the word “homintern,” an early incarnation of what the mainstream would call a “pink mafia”: a cadre of gays allegedly, secretly, running the world.

The curators have also unearthed the original and illustrated copy of The Young and Evil by Charles Henri Ford and Parker Tyler (with illustrations by Pavel Tchelitchew), which caused quite the scandale in its portrayal of a group of New York gay artists. Alongside it are two earlier gay novels—André Tellier’s Twilight Men (1931) and Blair Niles’s Strange Brother (1931)—whose protagonists, inevitably given the era, met tragic ends.

Proudly dominating one wall is a portrait of a nude Frank O’Hara painted by his one-time lover and professional collaborator Larry Rivers.

What is striking, right through to the mid-1990s, is that these venues were cultural hotbeds, not simply places to meet your kind, but places where writers, thinkers, and artists gathered, and sexual subcultures cross-pollinated with cultural movements.

The modern gay scene, dwindling as it is with the popularity of sex apps, simply does not have the same energy. When I sat with the curators later, we tried to disentangle the contradictions of LGBT cultural expression flourishing in darker times and the certain thrill and romance of that. Today, politically and culturally LGBT people have succeeded in so much, but what has been blunted or lost with that cultural energy being inducted into the mainstream?

That question becomes more insistent in the second gallery, which ferries the visitor from the late 1960s to the mid-1990s, and features the work of Andy Warhol, Robert Mapplethorpe, Harmony Hammond, Bill T. Jones, and Greer Lankton, as well as yet more intriguing, carefully chosen ephemera.

Clubland meets cultural assertion in the photographs of Chantal Regnault, which capture the black LGBT participants of “voguing” contests, one of which (‘Temperance and Octavia St. Laurent”) welcomes the visitor to this second room.

We’re taken on a nostalgic and moving geographical joyride through a series of LGBT locales: fliers from Danceteria and the Pyramid (which, although you could indeed dance and drink there, were also places of artistic expression and experimentation).

There are pictures of men sunning themselves and cruising on the then-rotting Piers in Chelsea, packed with sunbathers (watch the fantastic documentary Gay Sex in the 70’s for the best documentary on the era), and regulars in the Ramrod, the Mine Shaft, the Saint, and even the 'sip-in' at Julius, New York’s oldest surviving gay bar, where in 1966, three years before the Stonewall Riots, there was a Mattachine Society-led protest (by drinking) of a ban on openly gay men being served drinks.

The Duchess lesbian bar was a happy refuge from 1972 to 1982, and a card is reserved for Bonnie and Clyde’s, run by Elaine Romagnoli, who later opened the Cubbyhole, which is still thriving (and a personal favorite, with its hanging fish, of this reporter). Later came the Clit Club, and on another wall, Alice O’Malley’s photographs capture its regulars.

Post-Stonewall came publications like the literary Dyke: A Quarterly and Christopher Street, which in September 1977 carried the headline: “Can Gays Save New York City?” There are portraits of LGBT artists, writers, and muses who embodied the New York of the ’70s and ’80s: the magnificent Quentin Crisp, Susan Sontag, Candy Darling, and David Wojnarowicz.

The curated novels of the era—bold, explicit, now classics in their own right—include Larry Kramer’s Faggots, Andrew Holleran’s Dancer From the Dance, Edmund White’s Nocturnes for the King of Naples, and Rita Mae Brown’s Rubyfruit Jungle.

In the 1990s, the headlines in mainstream magazines like New York got even bolder: “Is Everybody Gay?” and “Lesbian Chic,” with k.d. lang gracing the cover. It’s fascinating to chart the transition of gay-as-other to gay-as-cool in this 30-year span. As positive as it seems, making homosexuality fashionable carried with it is own trivialization at a time when political equality was far away.

It’s a challenge to find fresh material sourced from artists like Warhol and Mapplethorpe, as well-known as they are, but the curators here succeed. For Mapplethorpe—only recently the subject of two major retrospectives in Los Angeles—there are pictures of him by Judy Linn, slinky and bare-chested getting dressed at the Chelsea Hotel. There are other pictures of him with his partner, mentor, and benefactor Sam Wagstaff, and wearing his jewelry; and the invitation to his first solo art show.

Warhol is photographed with Candy Darling by Cecil Beaton. There are Warhol’s line drawings of Truman Capote, and his video, and polysexual riot, Kiss, which features such Factory luminaries as his muse, one-time partner, and professional collaborator Gerald Malanga.

Further along to the wall is a note Warhol sent to Malanga on March 20, 1963: “Sweetest Gerry, Lying next to you was divine. I’ve wanted to kiss you for so long and the few drinks I had gave me the courage to do so. I wish you the happiest of birthdays. Love Andy.”

Harmony Hammond not only founded the lesbian periodical Heresies in 1976 but also oversaw a landmark lesbian-themed art show in 1978, and created work that spanned sculpture and painting, some of which is exhibited here.

“I have functioned as a kind of bridge,” Hammond has written, “insisting on a lesbian consciousness and presence in the mainstream and primarily straight feminist art worlds, and bringing an art consciousness into dyke communities, some more receptive to art than others.”

The dancer and choreographer Bill T. Jones’s collaborations with Keith Haring and Willi Smith are sketched (literally: Haring paints Jones’s body), alongside his professional body of work—many themed around sexuality, race, religion, and loss—alongside longtime partner Arnie Zane. The transgender artist Greer Lankton’s work—most memorable, her life-size doll of Diana Vreeland—is brought to life in a recreated Barneys window display, alongside her creations for Einsteins, a clothing and jewelry boutique owned by her husband, Paul Monroe.

HIV and AIDS casts a devastating, urgent, necessary shadow, as it claimed the lives of so many of the names above.

The video compilation that concludes the show includes not only the LGBT theater of the 1980s—like Peggy Shaw, Lois Weaver, and Deb Margolin’s Split Britches—but also Angels in America, Tony Kushner’s 1993 epic AIDS-themed play that later became an HBO mini-series. In the clip—stirring, moving, marvelous—the Angel America, played by Emma Thompson, thunderously visits Prior Walter (Justin Kirk).

There have been 20 important political and cultural years since the end of the exhibition, with LGBT life assuming ever more facets; political progress that would have seemed implausible even in the growingly open climate of 1995; tragedies such as the Orlando massacre; and politicians still all too willing to parlay bigotry for votes, that remind us how far we have to go.

The curators told me they had stopped the survey in the mid-1990s because that marked a fundamental moment of gay culture’s entry into the mainstream—not an end, just a moment of significant change. Having lost the argument to discriminate against us, the right’s only position now is to play the victim of progress, after years of bullying LGBT people and manipulating and fermenting prejudice and discrimination against us.

The cultural progress of transgender issues, marked by the success of Transparent and the impact of Caitlyn Jenner’s declaration, is in stark contrast to the violence and discrimination many trans people still face. LGBTs stride forward and celebrate, yet we remain targets. We get hit, we fight on, we carry on.

If Gay Gotham reminds us of anything, it is this persistence and endurance, and why enriching culture was critical not only to LGBT progress, but also pride. LGBT political activism has always been fed by cultural and artistic production; people setting words and images to paper and canvas to declare something of themselves, their struggle, their love, and their passion.

In a near-century of LGBT art, as Gay Gotham shows, the hidden came out of the shadows, was seen, celebrated, and then inspired others. These interconnections not only strengthened artistic communities, but those who chanced upon the art itself.

Gay Gotham will make you smile, laugh, and cry. It will make you horny and meditative. It will make you see New York anew, and yet it will remind you that its energy is nothing new, even if artists cannot afford to live here now and creative enclaves like the Lower East Side have long passed from scuzzy chaos to gentrified rich-person playgrounds.

A subsequent MCNY survey might ask whether ostensible mainstream acceptance, and the changing nature of New York itself, blunted the subversive, mischievous energy that provoked the art in Gay Gotham, or is LGBT artistic energy just expended differently in the culture today. While you ponder that imponderable, pick up the phone and listen to Richard Bruce Nugent’s poems, and marvel at Frank O’Hara’s lovely dick.

Gay Gotham: Art and Underground Culture in New York is at the Museum of the City of New York, 1220 Fifth Avenue (at 103rd Street), until Feb. 26, 2017.

There is also a companion book, which you can buy here.