The slingshot effect, also known as the light-speed breakaway factor, was a method of time travel through the use of an artificially-created time warp. This maneuver was performed by traveling at an extremely high warp factor towards a massive body with a high gravitational attraction, such as a star. After allowing the gravitational pull to accelerate the vessel to even faster speeds, the vessel would then break away from the stellar body, creating a whiplash effect which could transport the vessel through time. Performing this maneuver required extremely precise calculations to be made, such as availability of fuel components, acceleration, and mass of a vessel through a time continuum. (TOS: "Tomorrow is Yesterday"; Star Trek IV: The Voyage Home)
In 2267, the starship USS Enterprise accidentally traveled through time to the late 1960s, when an encounter with a previously-uncharted black star required the crew to utilize all warp power in reverse to break away from the star's powerful gravitational attraction, creating a whiplash effect. In order to return to their own time, the crew of the Enterprise recreated the accident, using the gravitational pull of Earth's sun to perform the slingshot. (TOS: "Tomorrow is Yesterday")
In 2286, Admiral Kirk and his command crew were forced to use the maneuver again, this time in the stolen Klingon Bird-of-Prey HMS Bounty, when an extremely powerful probe threatened to destroy Earth while attempting to contact by then-extinct humpback whales. To appease the probe, Kirk and crew used the slingshot effect to travel back in time to the late 20th century to retrieve two humpback whales. (Star Trek IV: The Voyage Home)
In 2365, Captain Jean-Luc Picard and Commander William T. Riker speculated on what phenomenon could have thrown the El-Baz back in time. While Riker knew the shuttlepod didn't have warp drive, he still suggested the theory that it could have somehow accelerated beyond warp 10. Picard suggested this could have been achieved by a warp-powered slingshot using the gravitational pull of a star. (TNG: "Time Squared")
Based on Star Trek IV The Voyage Home and "Tomorrow is Yesterday", going beyond warp 10 and creating a time warp are two stages in the slingshot effect. In Star Trek IV the time warp was generated after the ship had passed warp 9.8. While in "Tomorrow is Yesterday" going reverse through time already begins when the ship is approaching the stellar body at over the speed of warp 8. In the episode it is stated by Sulu, that the speed of the Enterprise goes "off the dial" for a moment after the ship has broken away from the star and reverses its direction in time to travel forward again, suggesting the ship does go "beyond infinite" at that point.
According to Star Trek Maps (p. 6), the speed increase that dislodges the ship from the space-time continuum in a slingshot effect is caused by a mathematical factor called the Cochrane's factor. It is added as a multiplier to the basic warp formula based on the amount of curvature of space the ship is traveling through. While the factor within the normal interstellar medium of Federation space is an average of 1292.7238 and in the intergalactic void only 1, in the close proximity of stars and other massive objects it is so high that these disproportionately high speeds are created.
In the novel The Ashes of Eden, renegade admiral Andovar Drake attempts to use the slingshot effect to go back in time to ambush Kirk the day he arrived in the Chal system after the Enterprise-A and the Excelsior destroy Drake's supporting ships, requiring Sulu to beam over to the Enterprise to take the ship after Drake's bird-of-prey as an Excelsior-class ship hasn't attempted such a maneuver before. Although the Enterprise is able to damage Drake's engines before he can complete the slingshot, both ships are destroyed when they remain in the star's corona for too long, although Kirk's crew are beamed to safety by the Excelsior and Drake dies only because he refuses to accept his loss.
In the novel Engines of Destiny, Montgomery Scott acquires another Bird-of-Prey and attempts to use the slingshot effect to travel back in time and prevent Kirk's death on the USS Enterprise-B, believing that he can travel back to the day of Kirk's death and beam Kirk to safety just before the ship is struck by the energy ribbon, thereby not actually changing history as Kirk would still vanish and be presumed dead. The maneuver itself is successful, but as a result, a timeline is created where Kirk never enters the Nexus, Jean-Luc Picard never returns from it, and the Borg have assimilated Earth without Picard to stop them in Star Trek: First Contact. It requires the intervention of the USS Enterprise-D, which fortunately followed Scott's ship closely enough to avoid being caught up in the changes to history, to undo Scott's mistake and return Kirk to the Nexus.
In the tenth anniversary special trilogy Star Trek: Deep Space Nine - Millennium, the USS Defiant accidentally slingshots around the Bajoran wormhole after a second wormhole opens within Deep Space 9 itself, and is sent twenty-five years into the future. Although unable to return by repeating the procedure – something that is apparently vital due to the time-travelers being "out of sync" with the rest of the universe and therefore unable to use other time-travel methods to return home – before the Bajoran wormhole is merged with a red wormhole that was created as they departed, by entering a realm of non-linear time inside the merged wormholes, the crew are able to avert the creation of the red wormhole and erase the future they witnessed while returning to their time just before the destruction of Deep Space 9 in the past.
In the novel The Rings of Time, it is all but explicitly stated that the slingshot maneuver is used when the Enterprise has to travel back to Saturn in 2020 when Kirk's mind is swapped with Colonel Shaun Geoffrey Christopher after an encounter with an alien probe in 2270.
In the novel Forgotten History, it is revealed that, initially, the Enterprise was the only ship capable of performing a slingshot maneuver, due to its engines being exposed to a unique set of conditions during their jump back in time after a cold start in "The Naked Time", resulting in the newly-formed Department of Temporal Investigations claiming the engines during the ship's refit to create a timeship of their own. However, the knowledge of how to make any ship capable of performing a slingshot maneuver was revealed to Kirk by Agent Lucsly of the DTI when he was forced to work with Kirk during a malfunction of Timeship Two, when an attempt to blend the slingshot effect and dimension-shifting technology to let the ship travel into the future of alternate universes trapped the ship between 2273 and 2383 and risked altering the future.
In the novel Elusive Salvation, the Enterprise is able to send a small probe back to 1971 via the slingshot effect, the probe containing a recorded message to Kirk's 20th century contact Roberta Lincoln asking for her help in finding out anything about an alien ship that crash-landed on Earth in 1845, the recording also noting that the probe is programmed to destroy itself in Earth's sun after delivering the message to limit potential temporal contamination.