Star Trek: The City on the Edge of Forever

On stardate 3134.0, the Federation Starship U.S.S. Enterprise NCC-1701 investigates temporal disturbances centered on a nearby planet. During the investigation, Sulu is caught in a console explosion and suffers a heart flutter. Doctor McCoy is summoned to his aid and decides on a cordrazine shot to awaken him. Moments later, McCoy accidentally injects himself with an overdose of serum causing him to become violently paranoid. Delusional, McCoy flees from the bridge and beams down to the planet.
Captain Kirk forms a landing party made up of two security guards, himself, Spock, Scotty, and Uhura. Once on the planet, Spock finds that the source of the time distortions is an ancient ring of a glowing, stone-like material. The ring speaks and identifies itself as the "Guardian of Forever", explaining that it is a doorway to any time and place — with periods of history displayed in the opening. The team soon locates McCoy, however he runs away and leaps through the portal before anyone can stop him. Suddenly the landing party loses contact with the Enterprise. The Guardian informs the landing party that history has just been altered and as a result, the Enterprise has disappeared.
Kirk believes that McCoy somehow altered the past, erasing the history that they knew. Kirk asks the Guardian to loop the history images again and he and Spock get ready to jump through to a time just before McCoy entered so that they can correct what McCoy has changed. Kirk and Spock leap through at the correct moment and materialize in New York City, back on Earth during the 1930s Great Depression era. Their uniforms and Spock's ears shock a passerby, so Kirk steals some clothes he spots hanging on a fire escape and the two hide in the basement of a nearby building. There they meet a woman named Edith Keeler (played by Joan Collins), who identifies herself as a social worker of the 21st Street Mission. They apologize for trespassing and offer to work for her. Their kindness wins her over and she allows them to stay. In the meantime, Spock begins to construct a processor interface and uses it to find out what part of history McCoy has altered.
Kirk soon begins to fall in love with Edith. He finds her a remarkable visionary with a positive outlook about what the future holds for mankind. McCoy materializes at this point, and stumbles into the 21st Street Mission, after an encounter with a homeless man. Edith sees him in line and rushes to his aid. McCoy still looks very ill and Edith takes him to lie down.
Spock finally finishes the interface and he and Kirk analyze the data. The information it reveals is shocking as they discover Edith ought to have died soon in a traffic accident, but McCoy's actions have prevented that fate. If she had survived, she would have formed a popular pacifist movement at the outset of World War II and met with Franklin D. Roosevelt. This meeting would delay the entry of the United States into the war and allow Nazi Germany time to develop a nuclear bomb and conquer the world. Kirk is appalled by the fact that if she doesn't die as she is supposed to, history will be altered forever.
Meanwhile, Edith nurses McCoy, who tells her who he is and where he is from. Edith does not believe his fantastic-sounding story, but tells him that he would fit in nicely with her new eccentric boyfriend who will later be taking her to a movie starring Clark Gable, an actor with whom McCoy is not familiar.
Later, as Kirk and Edith start to walk toward the movie house, she mentions off-handedly that her new friend McCoy didn't know who Clark Gable is. Kirk however, is excited to learn that McCoy is alive and well and emphatically tells Edith to "Stay right here," while he dashes across the street to notify Spock. As he reaches Spock, McCoy exits the mission right in front of them. The three comrades enjoy an enthusiastic reunion while Edith watches them, intrigued, from the street corner. She slowly crosses the street to join them, but is oblivious to a fast-moving truck that is approaching her.
Kirk takes a step in her direction instinctively and freezes when Spock says, "No, Jim!" McCoy then sees Edith's danger and turns to move past Kirk into the street. Kirk holds McCoy back, the truck hits Edith and she is killed. The shocked McCoy says to Kirk "I could have saved her...do you know what you just did?" Kirk pushes him away, speechless, and Spock says quietly, "He knows, Doctor. He knows."
With Edith's death, history reverts to its original timeline and Kirk, Spock and McCoy return to the Guardian's planet. The rest of the landing party still waits and Scotty indicates that the three had only been gone for a few moments. The Guardian says, "Time has resumed its shape. All is as it was before." and adds, "Many such journeys are possible. Let me be your gateway." Uhura indicates the Enterprise is ready to beam them back up and Kirk responds numbly "Let's get the hell out of here." The landing party is transported back to the ship and the Guardian is alone once again.