It was the best of times; it was the gayest of times. And in Mardi Gras history, it was a beautiful era. In “Unveiling the Muse: The Lost History of Gay Carnival in New Orleans” (University Press of Mississippi, $50), with a foreword by Henri Schindler, writer/photographer Howard Philips Smith celebrates the glory days of gay Carnival krewes.

Smith, who grew up on a farm in Mississippi, lived for a time in New Orleans as a youngster and settled in New Orleans for a decade after graduating from the University of Southern Mississippi and studying in France. One unforgettable Carnival season in 1985, he and a group of friends decided to go to ALL the gay Carnival balls. It wasn’t exactly an easy undertaking — you had to know someone to get a ticket — but fabulousness ensued.

“I was in my 20s — you know, young and crazy. It was just so beautiful,” Smith said, speaking from Los Angeles, where he is the art director for libraries at the University of Southern California. “I’ll never forget it.”

That’s the inspiration of this gorgeous coffee table book, with its beautiful design and lavish reproductions of Carnival photos and ephemera. Smith spent years looking at materials, researching the documents in the archives at the Historic New Orleans Collection, the Louisiana State Museum and countless other institutions.

When was the first Carnival ball? While there were numerous private costumed celebrations, the Krewe of Yuga held its first ball in 1958. And others followed.

But the '80s, as Smith sees it, were the highlight. ”Each krewe had 30-40 members, people spent all year working on the ball and keeping it a secret,” he said.

Then came AIDS. “I lost all my friends,” Smith said. “The gay krewes almost got wiped out, and membership dwindled, but somehow some survived. And we started raising money for AIDS. Priorities were different.”

Krewe by krewe, Smith chronicles history, longevity, themes, monarchs, along with entertaining anecdotes and useful timelines. There are reproductions of posters and invitations and call-out cards and photographs, tributes to noted Carnival artists. This truly is a book worthy of its subject — colorful, extravagant, a labor of love. Remember Restaurant Jonathan and the scene on Rampart Street? They’re chronicled here too to give a sense of the larger cultural surround.

Great characters populate these pages. Antiquarian Elmo Avet, photographer Jack Robinson who went on to have a brilliant career as a fashion photographer in New York, Clay Shaw (don’t miss the photo of him dressed as Socrates outside Dixie’s Bar of Music), and yes, Tennessee Williams himself, who once danced the night away at a ball with the theme “Bluebird of Happiness.”

What kept Smith going over the years of writing and research? “It’s passion. Discovery. Unlocking a secret. It’s getting recent history right — there are so may lies and legends that have grown up about Carnival. And it’s obsession. The thrill of figuring it out.”

When Smith talks about Carnival, he is delightful and delighted, exuberant and eager to share his discoveries. He describes a Mardi Gras ball in Chalmette, where the local police stopped traffic so the drag queens could cross the street to the ball, conjuring the magic of that moment so clearly the listener feels the joy and absurdity of it all.

What one Carnival ball of the past would Smith most like to have seen? “Oh, so many,” he said. “But I think Amon-Ra’s Picnic Fantasy Ball.”

It’s easy to see why: The climax of the ball came when a costumed caterpillar rose on hydraulic lifts to morph into a monarch butterfly, to the background music of Handel’s “Hallelujah Chorus,” sung by the Gay Men’s Chorus.

We may take gay Carnival for granted these days, but Smith reminds us that it wasn’t always that way, that even innocent fun had a criminal price for the LGBTQ community at one time.

“I always tell people I never do anything political, but of course this book has a political edge,” he said. “There have been so many books about Carnival and none of them have mentioned gay Carnival. It seems to me, in this Tricentennial year, this is the time for this book. This gives gay Carnival a bigger piece of the pie in Mardi Gras history. It can’t be left out of Carnival any more.”

Susan Larson hosts The Reading Life on WWNO-FM.

Outbrain