Issue number 15 of Gold Key Comic's Star Trek comic book dated August 1972 featured a story entitled "The Museum at the End of Time." The comic story was written by Len Wein and its plot was very similar to an animated Star Trek episode "The Time Trap" which aired a little more than a year later on November 24, 1973. The first draft of the script for the animated episode "The Time Trap" was written by Joyce Perry on October 19, 1973. (The comic book cover is shown at right.)
In the comic book story, after traversing a cosmic storm, the
Enterprise and a Klingon Battle Cruiser find themselves in a timeless netherspace called "Limbo." In this limbo are dozens of spaceships that were reported missing over the centuries from races all over the galaxy. The inhabitants tell the newcomers that there is no way out. The Federation and Klingon vessels eventually break out of limbo by cooperating. Even though the way out had been discovered, limbo's inhabitants weren't interested in leaving. Once free, Captain Kirk and the Klingon ship captain communicate and decide that it would be foolish to cooperate one minute and try to kill one another the next. So the two ships go their separate ways.
This is essentially the same story as "The Time Trap" in every important detail. It seems clear that this comic story, written by Len Wein (pictured), formed the basis for one of the Animated Star Trek's more interesting episodes. The situation is similar to how several Batman comic stories were dusted off and made into scripts for the live-action Batman television series of 1966-68.
What is interesting, is that Mr. Wein's contribution was not credited as the basis for the episode's story as Larry Niven was for "The Slaver Weapon."
A much more detailed synopsis of Gold Key Star Trek Comic #15 can be found at my Guide to the Gold Key STAR TREK Comics web site.