Star Trek: Tomorrow is Yesterday

On stardate 3113.2, the starship USS Enterprise, under the command of Captain James T. Kirk, is thrown back in time to Earth in 1969 by the effects of a high-gravity neutron star (referred to as a "black star"). Enterprise ends up in a suborbital position in Earth's upper atmosphere, and the ship is picked up as a UFO on military radar.
Offutt Air Force Base in Omaha, Nebraska, scrambles an F-104 Starfighter jet interceptor piloted by Captain John Christopher, to identify the craft. The pilot cannot believe his eyes when he sees the bizarre spaceship floating above him. The pilot is ordered to stop the Enterprise from escaping before reinforcements arrive, and Kirk is forced to take defensive action. The ship emits a tractor beam toward the jet and the force accidentally tears the plane apart. Acting quickly, Kirk orders the pilot rescued from the doomed plane, and Christopher is transported aboard.
The man at first is confused with his new surroundings but is quickly amazed to learn all that the future has to offer. He learns such facts as Enterprise is one of 12 such starships, and why the computer started calling Kirk "dear", having been overhauled on the woman-dominated planet Cygnet XIV (who thought the computer needed a personality).
The problem quickly arises that returning this 20th Century pilot to Earth, after having seen a glimpse of the future, could contaminate the timeline. Learning the pilot's own as yet unborn son, Sean Jeffrey Christopher, plays an important role in Earth's future (as chief pilot for the historical Earth-Saturn probe mission), adds to the severity of the situation. Kirk must somehow return Captain Christopher to Earth without any knowledge of Enterprise.
Another problem is that Captain Christopher has taken photographs of Enterprise, which could be recovered by the Air Force, and also alter history. The first step is to steal the images and reports of the Enterprise's appearance from the airbase logs. Kirk and Mr. Sulu beam down to the base to locate the report files. Upon their removing the sensitive data tapes, a security guard enters and draws a pistol. Kirk and Sulu surrender their weapons and communicators to the guard.
Meanwhile, back aboard Enterprise, Mr. Spock contacts the Captain to check on his progress. When the guard "answers" the communicator, he accidentally activates an emergency recall to the ship, and is suddenly beamed aboard Enterprise, frozen in a state of shock. The Captain points out to Spock, "we have another problem" with yet another abducted (accidental this time) native to deal with; they decide to confine him to the transporter room to limit his exposure.
Kirk and Sulu continue searching for the remaining evidence of their time intrusion. Sulu successfully locates the rest of the files and returns to the ship while Kirk creates a diversion as more guards stumble upon them. Kirk is subsequently captured and taken to the security area for questioning.
Spock, with the help of Captain Christopher, beams down to the facility to rescue Captain Kirk. They subdue Kirk's guards and are ready to return to the ship, only to find Christopher has gotten a gun, demanding to remain behind. Fortunately, Spock had anticipated he would make such an attempt, and sneaks behind him to subdue him with a Vulcan nerve pinch, and they all return to the ship.
Spock and Mr. Scott inform Kirk they have an idea for returning to the 23rd Century, by slingshotting their way around the Sun. The theory is, time will reverse as the ship races toward the gravity of the star, then, as the ship breaks away, quickly run forward again. With precise navigation, the theory should work; however, braking is a problem, since a mistake could destroy the ship, or make them miss their preferred time period.
Enterprise sets out to make the risky slingshot. As time moves backwards, Kirk has Captain Christopher beamed back to his fighter jet at the instant he first sees Enterprise, so he now only catches a quick glimpse of the "UFO", and the sighting is written off as such for the rest of history. The security guard is returned to his own time as well, just moments before he first stumbles upon Kirk and Sulu. Enterprise then successfully returns to the 23rd Century.