I've been watching 12O'Clock High on MeTV and what I finding interesting is it has a number of musical riffs and cues that sound akin the the Star Trek theme music. so it sometimes makes me wonder in Alexander Courage was consciously or subconsciously ripping off something from Dominic Frontiere - the later who also did excellent music on/for the original Outer Limits and The Invaders.
There are only so many ways to put notes together in a way that sounds good, so different works of music have coincidentally similar melodies all the time. And composers working around the same time are influenced by the same styles and precedents, which makes it even more likely that they'd use similar patterns.
I've occasionally seen people say they thought two works of music were the same when they clearly had different melodies and just used similar chord structures, orchestral arrangements, and the like. Lots of composers use similar structural and stylistic components like that, but it's the specific melodies that distinguish one composition from another.
I found the 12 O'Clock High theme music on YouTube, and it didn't sound anything like the Trek theme to me, though I don't know if that's the part you're talking about.