I've seen this episode before, but I didn't really remember much about it. So, I'm coming into this slightly cold.
Making a Second Contact after picking up a radio report from a ship lost a hundred years, the Enterprise crew discover a world that has based its entire culture on a book about Chicago gangsters; which is causing major development issues. With the Prime Directive loophole in play, they now need to fix the issue without getting themselves killed.
***
The overall concept of an alien world being contaminated by some esoteric human culture is a fairly common trope in science fiction. This is the sort of episode that you can easily imagine turning up in The Orville - now I'm imagining Adrianne Palicki totting a Tommy Gun - or indeed Doctor Who. While there's definitely a 'Planet of Hats' aspect about this whole episode - most of the hats are awesome - there isn't time in this episode to explore other aspects.
It's a very strong episode for the regulars, especially Spock, who realises that this is not a situation where logic is going to work and is logical enough to admit it. Kirk is also having a lot of fun when he goes into full-on 'gangster' mode.
There is a lot of great humour in this episode: Kirk's inability to operate an old-fashioned car effectively, confusion over slang and the whole scene where they get a kid to distract some goons; although the last of course has some risks for the kid. They didn't pay him either!
A highlight of the episode is the 'Fizzbin' scene, where Kirk creates a weird card game out of thin air as a means to distract two guards. This is being Star Trek, it became a real game in the canon, featuring in an episode of Deep Space Nine. I wouldn't mind playing it in real-life, but you'd need a computer to handle the rules...
Paramount's backlots get used very effectively here, although a back wall is rather obvious in one shot when seen in HD.
The guest characters are pretty good - with Anthony Caruso's Bela Okymx demonstrating particular charm - but not truly memorable.
Two minor drawbacks. The lack of any active female roles is one, but perhaps understandable for the time. There's Uhura, sure, but her role in this is very limited. Also, Kirk, Spock and McCoy get captured more frequently than Kim Bauer.
Now I'm thinking of Elisha Cuthbert in Starfleet uniform. Best to end it there.
Conclusion
Not perfect, but a highly enjoyable episode nonetheless. Definitely a classic.
9/10