This episode opens with the Enterprise doing some scientific research around a planet which is emitting strange "ripples" in time. The ship is constantly buffeted and shaken by these ripples, but Spock insists that the data they are gathering is invaluable so they continue. Then there is an accident - a console burns out and electrocutes a crew member. Bones rushes to the bridge and decides that an injection of Cordrazine is needed, despite Kirk's layman's warning that it is "tricky stuff".
The injection works, but another ripple causes the good doctor to fall on his hypospray, giving himself a massive overdose of the drug. Bones immediately becomes hysterical and rushes from the bridge. He manages to make his way to the transporter room and beams down to the planet below, closely followed by a landing party led by Kirk.
Once on the planet the landing party discovers ruins of an ancient city - and in the centre of them stands a large, irregular ring structure. The crew fan out and are quickly successful in capturing Bones, who is raving with paranoia as a result of his overdose. Spock scans the ring and declares that it is the source of the time distortion. The ring speaks to the crew, announcing itself as "The Guardian of Forever". It claims to have been there for billions of years - greatly predating the ruins around it - and says it is a doorway that can take them to any time or place. Images appear in the middle of the ring, showing Earths past flowing by at the rate of decades every second.
McCoy breaks free of his guards and dashes through the ring. Instantly the Enterprise vanishes from orbit - all trace of the Federation has been wiped out except for the landing party who are protected by their proximity to the Guardian. Spock deduces that McCoy must have caused some change in the past which has prevented the formation of the Federation. The only way to restore history is to go through the Guardian after him. Kirk decides to go, ordering the others to make further attempts if he fails. Spock attempts to judge the exact moment to jump through, and the pair vanish.
Emerging on 1930's Earth, the pair steal some clothes to blend in with the locals - including a hat to cover Spock's ears. They find a local mission run by a woman named Edith Keeler where they can get some lodgings and work. Kirk is fascinated by Edith, who confidently predicts a future free of poverty in which man will travel the stars. While Spock spends his time attempting to build a computer capable of accessing his tricorder to view the images he recorded from the Guardian, Kirk and Edith fall in love.
Eventually, Bones appears in the city, still delusion. He collapses and is taken to the same mission, where Keeler cares for him. Gradually he recovers, although he is naturally reluctant to accept that he is really in the 1930's! Meanwhile Spock makes progress, and discovers the change McCoy introduced - in the original timeline Keeler was killed in a traffic accident. In the alternate timeline McCoy saved her, and she went on to become an important figure in American politics. Her avocation of peace delayed the entry of the USA into World War II, allowing the Nazis to develop the atom bomb first and so win the war. In order to restore time, Kirk must allow the woman he loves to die.
As Kirk escorts Keeler to the movies, she makes casual mention of Doctor McCoy. Kirk rushes back to the mission to be greeted by a delighted Bones. Edith, following him back, steps in front of a car. As McCoy dashes out to save her Kirk grabs hold of him and holds him back. Edith is hit and killed. Time is restored, and the three officers head back through their 'portal' to the future just moments after they left. The Enterprise is back in its normal place, and Kirk orders the landing party beamed up.
This episode is almost uniformly regarded by fans as the best episode of Star Trek : The Original Series, and indeed as the best ever episode of any of the four series. To me, the whole thing just reeks of quality. The acting is excellent throughout - De Forest Kelley makes a very convincing madman, most especially just after he arrives in the 1930's and starts raving about the medical technology of the time to a local drunk. Nimoy is, as ever, excellent as Spock. His finest scene is probably the one in which he tells Kirk that Keeler must die - you can sense the sympathy his character has for Kirk behind that ever-present wall of logic. Many people deride William Shatner's acting abilities, but I've always thought he played Kirk wonderfully and this is especially evident in this episode. The role culminates in the last few minutes of the episode - the look of angst on his face when Keeler is hit by the car is followed by his emergence from the Guardian, where Kirk is obviously holding himself under very tight control. When the Guardian offers him the opportunity of many more journeys like this one, Kirk stares at it in anger before ordering everybody back to the ship. All very nicely played without the over-the-top emotionalism that Shatner is often accused of. Excellent support is also provided by Joan Collins as Keeler, who is believable throughout as the tough-but-caring angel of the mission.
The writing is easily up to the acting. All too often in Trek, the science and technology aspect is used as a story - a trend which seems to be growing over time and which is a long standing gripe of mine. Time travel episodes are especially prone to this, since time travel itself is by its very nature a fairly technobabbly business. But in this episode the use of technobabble is minimized; by making the Guardian a sentient being which can explain its own capabilities, we are spared explanations of chronaton particles or temporal anomalies from Spock. And the Guardian itself comes across very effectively in an almost Lovecraftian manner - offering a world of enticing possibilities, but in actuality a deadly trap for those who venture inside.
Even the whole time travel aspect has only a relatively minor impact on the plot - this story could just as easily have been told by having a fortune teller prognosticate Keeler's future for Kirk, or any number of other methods. So here we have the very best form of science fiction, in which the technology aspect supports a solid story rather than being the story itself.
Within this wonderful plot we have many fascinating moments. The scene where Kirk and Spock are caught attempting to steal some clothes is one of the funniest moments in any episode - most especially when the cop examines Spock's ears only to have Kirk declare that his friend is of course Chinese, and as a child caught his head in a mechanical rice picker. Another good moment comes when he watches Keeler giving her speech about the glorious future to come; Kirk is clearly smitten with her, and when a nearby hobo begins to make a disparaging comment Kirks face is a picture as he snaps at the man then tries to justify it with "I want to hear what she has to say..."