“I’ve always been kind of an idiot savant,” Gilbert Gottfried tells The Post. “Well, more idiot than savant. I was one of those people who always remembered the names of character actors and makeup men.” That gift goes back to elementary school in Brooklyn, when his teacher threw out initials, asking students to name the celebrity — as in BH for Bob Hope. One day the initials were “OS,” and young Gilbert shrieked, “Onslow Stevens!”

“He was an old character actor,” says Gottfried, 61, “but everybody turned around and looked at me, like, ‘What the hell is he talking about?’ ”

Trivia has served the comedian well: Since 2014, he’s hosted “Gilbert Gottfried’s Amazing Colossal Podcast!,” a weekly celebration of old-time TV and film. On Tuesday at Carolines, he’ll record a podcast with Whoopi Goldberg, a friend from his “Hollywood Squares” days.

“I remember watching the show thinking, ‘This must be the bottom of the barrel of show business,’ ” says Gottfried, who nevertheless found himself in one of those squares in 1998, squawking, “You fool!” at unwary contestants.

He’s far gentler with the actors, comedians and writers he interviews for his podcast, people Gottfried admires and is often surprised by. “Adam West, TV’s original Batman, said he and Frank Gorshin, who played the Riddler, were once kicked out of an orgy together,” Gottfried says. “I think because they weren’t taking it too seriously.”

From Sonny Fox, host of the ’60s children’s show “Wonderama,” Gottfried expected stories about “cute kids”; instead, Fox recalled his time as a prisoner of war in WWII. And actress Lee Grant told how, just when she started to become famous, she asked the mayor of Los Angeles to let her shave a few years off her driver’s license: “And I guess the mayor was a fan of hers, because he let her do it!”

Most of Gottfried’s guest list skews old — sometimes fatally so.

“We were after Jack Carter, the stand-up comedian, and he agreed to do it, but then he died,” Gottfried says. “When we were first forming this [podcast], I was going to call it ‘The Before It’s Too Late Show!’ ”