|Dr. Ann MacGregor on planet Gateway|
Doctor Ann MacGregor was a Scientist of the 23rd century assigned on planet Gateway to study the Guardian of Forever, a temporal artefact, at Project Timepiece since James T. Kirk and the crew of the USS Enterprise (NCC-1701) discover this construction in 2267. In 2268 professor Winston Daniels discovered a gigantic version of the Guardian of Forever, security around the site was quickly increased and all the scientists working on the planet obtained clearance level alpha, included MacGregor.
Several months later, Kirk lent Commander Spock to help her. MacGregor and Spock detected a magnitute-ten variation in the natural flow of time, and the timeline was altered by a Doomsday machine who came from the future, exactly from 24th century, and destroyed the USS Enterprise in 2254 under the command of Captain Christopher Pike. It seemed the entire planet had been protected from changes in the timeline due to the unusual time ripples in the region.
In this alternate timeline, Kirk would become commanding officer of the USS Farragut in 2258 after the death of Captain Steve Garrovick. MacGregor and Spock from original timeline contacted Kirk, who assisted them in preventing the Doomsday War.
Kirk, Spock and Leonard McCoy used the smaller gateway to travel to the year 2006 after following some unusual readings from that time. They discovered that when Commodore Matthew Decker detonated his shuttlecraft within the planet killer (TOS: "The Doomsday Machine") it sent him back to the year 1967. They recovered microtapes from his shuttle and returned to 2268. There they discovered that when the USS Constellation was detonated within the planet killer it caused the weapon to not be destroyed but sent back in time to 2254, where it encountered and destroyed the USS Enterprise, thus causing the alternate timeline and the "Doomsday War".
Kirk decided it was necessary to take the Farragut back to 2254, and combine forces with the Enterprise from the past. Dr. McGregor then showed them the larger version of the gateway which they used to send the entire ship back in time to correct the course of history. First, MacGregor said that it's insane, but Kirk insisted on doing. When they returned the timeline had been fully restored. The crew of the vessel and the workers of Project Timepiece were apparently the only ones aware of what had happened. (Star Trek: New Voyages: "In Harm's Way")