Star Trek: The Next Generation, Yesterday's Enterprise. First aired Feb. 19, 1990.
Based on a spec script by an outside writer who was also a Trek fan, this episode explores the fate of a previous Enterprise (the NCC-1701-C, if you were wondering, as compared to Kirk's original NCC-1701 and Jean-Luc Picard's NCC-1701-D). The Enterprise-C travels through a temporal rift and just so happens to appear not far from Picard's Enterprise-D, which instantly morphs from a ship of peace to a gloomy war craft. Only the bartender Guinan a delightful Whoopi Goldberg knows that something is wrong. Four Paramount writers including Ronald Moore, later of Battlestar Galactica fame polished the episode into a taut, unpredictable thriller with an exhilarating complement of phasers and photon torpedoes. The episode also reveals some key elements of Starfleet "history" and makes a deeper point about how just one ship (ours, of course) can change the universe.