Star Trek: The Animated Series
The Time Trap
S1 E12:
The Enterprise and a Klingon ship must join forces to escape from a pocket universe that has been trapping starships for centuries.