With a title derived from an ancient proverb ("Those whom the gods wish to destroy they first make mad"), this literal case of "inmates running the asylum" is sort of a mashup of "Dagger of the Mind" and "The Squire of Gothos", but without the subtlety or charm of either.
The planet-based episode features Kirk and Spock visiting a Federation funny farm, with Steve Ihnat guest starring as Garth the shapechanging inmate and the premise, plot, and whole story revolving around the guy trying to trick Kirk and Spock into giving away the code needed to beam up to the Enterprise. Cause, you know, no one ever beams up without some sort of code phrase... except in every other episode.
As the plot goes in circles, there's dinner, dancing, torture and exploding, with Yvonne Craig (more famous as Batgirl), playing the only other inmate of note, a spunky Orion named Marta. For Craig, who was passed over for the part of Vina in the original pilot, it's an interesting consolation prize: four years after Susan Oliver was shot as a dancing Orion slave girl who tries to seduce Captain Pike, Craig donned the same make-up for scenes where Marta dances and attempts to seduce Captain Kirk. ("Gods" also includes a underappreciated performance from prolific Chinese actor Keye Luke as the governor of the asylum).
In the end, however, it's Inhat's show, with the actor giving "Lord Garth" a Captain Picard-like Mid-Atlantic accent and a flamboyant charm that stands out. (Sadly, Ihnat, a native of Czechoslovakia, died just a few years after shooting "Whom Gods Destroy", succumbing to a heart attack in 1972 at only 37 years old). The script and direction, however, work against him; with the sloppy ideas undercutting the drama and making everyone look like an idiot. (Poor Spock has it the worst, being inexplicably unable to figure out who's Kirk and who's Garth in Kirk form).
There's a kernel of a good idea buried here: that a great man in wartime might find his talents and ambitions out of place in peacetime; but TNG taps into much better in its fifth season episode "The Wounded". For TOS, "Whom God's Destroy" is just another disappointment as the show enters a dismal slide in the back half of its third season.
This is another easy one for CBS Digital, with just a few shots of the Enterprise and a planet needed. (The original version reuses the "Operation: Annihilate!" footage, but the remastered counterpart replaces this with a more lifeless looking world).