This review begins with a summary, with spoilers.
While investigating a planet with tremedous temporal distortion waves, Sulu is injured by an exploding console. In order to revive him, Dr. McCoy uses cordrazine, a dangerously strong drug, to be used only in small amounts and in cases of extreme emergency. Sulu is revived, but with a sudden movement of the Enterprise due to the turbulence, McCoy accidentally pumps himself. full of the entire hypospray-full of cordrazine. Crazed, he thinks everyone is trying to murder him and makes a run for the transporter room, where he beams himself down to the planet.
Kirk, Spock, Scotty, Uhura, and a redshirt go after him, discovering at the origin of the temporal disturbance a gateway left by an ancient civilization, not quite machine and not quite biological. When asked a question, this gateway, calling itself "The Guardian of Forever" responds, displaying a sped-up view of all of the questioner's history (in this case, human history). McCoy, thinking it is a way to escape these "murderers" jumps through the gate and disappears.
All of a sudden, the Enterprise isn't there anymore; history has been changed. Spock realizes that he has been recording centuries, millenia of history on his tricorder. Using this, members of the landing party must go back to the point in the past at which McCoy changed the course of history and stop him from doing so. Kirk and Spock naturally go first.
They find themselves in Earth of 1929...during The Great Depression. The first order of business is to make themselves fit in. Kirk steals some clothes, and they get stopped by a policeman, who looks suspiciously at Spock's ears. When he was young, "he...caught his head in a mechanical rice-picker," Kirk explains. They run away and duck into a basement, which turns out to be the basement of the 23rd Street Mission, run by a Miss Edith Keeler, who discovers them in the basement. "A lie's a very poor way to say hello," she chides. "It's not that cold out" that he would need to come in to hide from it
Keeler takes them in, giving them work in the shelter and finding them a flop ("A flop is a place to live!") in her building. As Spock races to rewire his tricorder so that it will display what he's recorder at a slower speed working only with the "stone knives and bear skins" that are available in 1920s America and that they can afford to purchase, Kirk falls in love with Keeler. This isn't just one of Kirk's brief flares with alien women (usually brought on by some hormonal troubles, such as Elaan's tears in Elaan of Troyius (TOS)) but actual love, maybe the strongest in the course of the entire series.
Keeler is an extraordinary woman, far ahead of her times. In a talk she gives to the people at the shelter, she predicts that man will be able to harness the power of the atom, that knowledge will be used to cure disease, and that humans will travel into space. She asks that they survive and live for those days in the future when life will be worth living. To Kirk she is sensitive and perceptive, recognizing that he and Spock don't belong there. She says that Spock belongs "by your side, as if he's always been there and always will be" and Kirk "belongs somewhere else...I'm not quite sure where, but I'll figure it out, eventually." She asks if he has done something wrong, saying "Let me help." Kirk tells her that, "a century from now, a famous writer will pen a book recommending those three words even over the words 'I love you.'"
Unfortunately, Spock figures out what it is that McCoy has changed in the past, and it has to do with Edith Keeler.
He doesn't, however, know which path is the one that leads to his future, the one in which Keeler dies or the one in which she doesn't, because as he finds out, the circuits he has put together burn out. He only knows that McCoy either saves her from an accident she should have had or causes one. It pains him, but he must tell Kirk this, and they must hurry to find McCoy.
When Spock fixes his tricorder setup again, he finds out that McCoy did indeed prevent an accident that should have killed Keeler; allowed to live, she founds a pacifist movement that delays the United States' development of the A-bomb, and Germany beats them to it, winning the war. Kirk is, naturally, heartbroken, but he knows he must let her die, in order to save thousands who would not have died before.
Meanwhile, McCoy appears in the Mission, unnoticed by Kirk and Spock, and, looking as though he has drunk "out of the wrong bottle" (which, in a sense, he has), is escorted to a back room by Keeler to recuperate. In his drugged condition, he talks to Keeler about Starfleet and the Enterprise. When Kirk later takes her out to a movie and talks of similar things (actually, neither man knows what movies are), Keeler comments that he's "just like Doctor McCoy...He's in the mission." Kirk runs across the street to tell Spock just as McCoy comes out of the shelter. The three have a grateful reunion, but history moves on despite the interference of travellers from the future, and they turn around just in time to see Edith crossing the street to them, unaware of the truck turning too quickly around the corner. McCoy tries to save her, but Kirk stops him, turning away. "Do you know what you've done, Jim?" McCoy asks. Spock replies, "He knows, Doctor, he knows."
This is one of fans' favorite Star Trek: The Original Series episodes, placing behind only the humorous episodes such as The Trouble with Tribbles (TOS), being excellent storytelling and a non-cheesy plot; it was written by Harlan Ellison and won a science-fiction award. Joan Collins played Edith Keeler.
(There is another version of this story, told in the Star Trek: Brave New Worlds II story "Tryptich" in which Kirk and Spock do not succeed in stopping McCoy and first Scotty, then Uhura must follow them into the past to fix history. This change in the plot allows for some poignant and interesting scenes not in the episode.)