The Enemy Within is one of the finest episodes of Star Trek's first season, and its central idea has gone on to inspire similar scenarios in other genre shows, most notably Buffy The Vampire Slayer (see episode The Replacement in Season 4). It deals with a classic theme of horror and sci-fi literature, the double, and gives William Shatner the chance to have lots of fun with his role(s).
Sticking with formula, the episode starts with a patrol exploring a new planet. Unfortunately, when it's time to beam them back up on the Enterprise, the transport system starts malfunctioning, which results in Captain Kirk being literally split in two: one half is calm and rational, the other determined and impulsive. This triggers a race against the clock, since neither Kirk can survive without the other part, but also because if the transport device isn't fixed in time, Mr. Sulu and the other crew men left on the planet will freeze to death.
Having a double of a well known character is always interesting, whether it's an impostor, a robot or something different altogether. In this case, what really makes the story interesting is the fact that the "replacement" Kirk isn't a villain in the proper sense of the word: he's just a specific part of the captain's personality, with no rational components to keep the more violent sides of his nature under control. As such, The Enemy Within is a peculiar spin on the traditional Jekyll/Hyde "myth", made possible by the infinite possibilities of science-fiction storytelling.
More important, though, is what the episode allows in terms of performance: just like Naked Time gave some cast members the opportunity to fool around, this time Shatner has the unique privilege of being able to take Kirk (well, part of him, actually) to some darker places, expanding on the previous episode's idea of the character being torn between duty and private desires. It adds lots of tension, but it's also a very funny double portrayal, and one of the key ingredients of Trek's long-lasting success.