When I first saw this episode in 1968, I was half impressed. The clever ending I liked, and the knockout gas scene, but the half-built sets put me off. In hindsight, this episode has much to recommend it.
The western set functions like a stage production: bare bones, but enough to give you the general idea. Quite fitting considering who put them there (the Melkotians apparently also had a tight budget). The photography and staging are excellent, especially at the OK Corral. There's a real feeling of dread.
The actors playing the western bad guys are top notch, as if they walked straight off one of the many westerns still on TV at that time. As a bonus, the bartender is a hoot, a Walter Brennan soundalike.
Ordinarily I'd roll my eyes at this type of show: all-powerful aliens (again), an Earth-like setting (again), a plot based on earth's history (again). But it works. The dialog is top-notch and the bad guys look fearsome. Yet there's even room for Scotty's humorous and unnecessary "pain-killing" swig of liquor.
At first glance, this episode looks like "this isn't my Star Trek!" But in the context of a final season when many people have bailed on the show for various reasons, here we have an episode that dares to be different and be almost experimental.
And it almost qualifies as a spoof of all those other westerns still hanging on for dear life. They can't do a space travel show, but Star Trek can visit the wild west. Beat that, Gunsmoke!