Charles Kaiser is the author of “1968 In America,” “The Gay Metropolis,” and most recently, “The Cost of Courage.”

Practically no one realizes what it was like to be gay in America in the 1950s and 1960s — no one except those old enough to have had the experience themselves. In that era of fierce prejudice, being openly gay barely struck anyone as a practical choice, except for an occasional courageous iconoclast like James Baldwin, Allen Ginsberg or Christopher Isherwood.

The latest window on the closeted world that nearly all gay men inhabited is Joel Grey’s newly published autobiography, “Master of Ceremonies.” This lovely memoir by the actor best known for his role as the emcee in the film “Cabaret” is a reminder that just a few decades ago, people in every profession believed that being perceived as straight was an essential prerequisite for success — even actors in the theater.

Grey’s secret gay life began in 1942 at the age of 10, with the 16-year-old elevator operator in his fancy Cleveland apartment building. It continued with a cousin and then a fellow actor. He saw his first potential role models in a gay couple who acted in one of the first theater companies he belonged to. But even the act of identifying with that couple frightened him, because men who loved men were “fairies, homos, limp-wristed perverts, sissies, and fags.” Making love to a man “felt right to me, but I knew it would get me into big trouble.”

His goal, always, was to be a family man. When his head was turned by actress Jo Wilder, he shocked her by proposing just three weeks after their first date. He writes: “Suddenly I felt differently about my sexuality. . . . After a life full of fraught romances with both men and women . . . I was falling in love with this woman, this Jo Wilder, and this feeling seemed to put an end to all the questions, replacing them with an answer. Jo and Joel.

"Master of Ceremonies: A Memoir" by Joel Grey (Flatiron)

Like virtually all gay men in this era, he had been told that his attraction to men was only “a stage.” A therapist told him that it was “developmental, something I would eventually get over with work and understanding. That’s what I wanted, too.”

The novelist Edmund White reports exactly the same feelings in his memoir, “My Lives.” “I could only hope that I was going through a stage. . . . I wanted to be heterosexual. Who could want to be sinful, abnormal, sick, criminal, a prey to blackmailers and a pariah in every area of public life? What writer would want to duck aside from all the crucial rites of passage?”

Disgust with homosexuals was so universal in the 1950s, nothing at this stage of his life could have convinced White that there was anything healthy about his orientation. “Even if someone had tried to refute my horror of homosexuality I would have instantly rejected his insinuating proposals, tempting me to settle for second best,” he wrote. “I knew that only the most insulting pity and condescension could lead someone to recommend that I surrender to my disease.”

When I began my own coming-out process in the early 1970s, I benefited from the first stirrings of the gay liberation movement, ignited by the 1969 police raid of a gay club, the Stonewall Inn, in Greenwich Village. But I, too, was susceptible to the argument that I might only be going through a stage. And so I continued to sleep with women occasionally, until I became exclusively gay in my late 20s.

I have always believed that no one chooses to be gay, but a great many men choose to be — or strive to be — straight. Grey was squarely in that second category. Still, all the time he was with his wife, he was seeing men on the side, a solution that remains common among gay men married to women.

Grey told himself that sleeping with men wasn’t being unfaithful to his wife. “But if I had been honest, I would have asked myself what these moments with men truly meant. The closest answer I could come up with was that it was about taking care of oneself, the self that existed before there was a wife, the self that I never stopped struggling with. I never looked for what was missing in another woman. I needed the safe haven of men.”

After 20 years of marriage, Grey decided that the time had finally come for him to reveal at least some of his gay secrets to his wife, in the mistaken belief that this would strengthen their relationship. But his honesty had the opposite effect. Though Grey doesn’t say so, he was perhaps confirming something his wife had always feared but had successfully denied to herself. In any case, as soon as he told her the truth, their marriage was essentially over, and within a year his wife left him for good.

His constructed identity as a happy family man was so important to him, its disappearance was utterly devastating. “I immediately got sick with a terrible flu, as if everything, even my immune system, had given up. I felt abandoned, rudderless, and totally without value. My whole life was coming undone. I had done everything in my power not to be homosexual, no matter the cost, and now the whole construct was falling apart around me. The destruction had such far-reaching effects, just as I had feared. . . . I wept all the time. I lost my taste for food and forgot to sleep.”

His new life was vastly complicated by the fact that his marriage dissolved just as the AIDS epidemic began, making gay life even more terrifying to him. Eventually, the epidemic would do more to destroy the closet than any other event. For Grey, it would ultimately provide his salvation, in the form of a role in Larry Kramer’s searing play about this medical catastrophe, “The Normal Heart.”

Playing the role of Ned, Grey got to speak the words that would finally obliterate all of his doubts about his true identity: “The only way we’ll have real pride is when we demand recognition of a culture that isn’t just sexual. It’s all there — all through history we’ve been there; but we have to claim it, and identify who was in it, and articulate what’s in our minds and hearts, and all our creative contributions to this Earth. . . . That’s how I want to be defined: as one of the men who fought the war.”

For Grey, this was the transformational moment: “Ned forced me to look at the parts of myself I had tried to hide for so long. Although no one knew it except me, saying those words to the audience was like revealing and standing up for myself in front of the world. Eight times a week, I got to be a gay man, a remarkable gay man, and every night that felt as full, as true, as passionate and as authentic as I ever felt in my life.”

The journey out of the closet had the same effect on many gay men of that era. Together, we discovered the incomparable power of authenticity.

Master of Ceremonies
A Memoir

By Joel Grey

Flatiron. 244 pp. $27.99