This is not a sentence but an infinitive clause acting as a nominal defining one aspect of the Enterprise's mission. Where no man has gone before is a locative complement to the verb go, the destination or goal of going, just like to boldly go home or to boldly go around the corner.
In fact, there is only actual sentence in the Star Trek introduction.
Space, the final frontier. [not a sentence: a phrase defining the scene]
These are the voyages of the starship Enterprise. [the actual sentence!]
Its five-year mission: [not a sentence, but a noun phrase characterizing what follows]
to explore strange new worlds, [an infinitive clause]
to seek out new life and new civilizations, [an infinitive clause]
to boldly go where no man has gone before. [an infinitive clause]
Think of it as a series of captions or headlines.