Science Fiction and Adventure
First and foremost, Star Trek is science fiction, positing a utopian future where Earth lives in harmony as part of an intergalactic federation of funky aliens (and the less-funky aliens who they sometimes have to blow to kingdom come).
More specifically, it's space opera, a sub-genre of science fiction that's known for adding epic grandeur to its future, and tends to stray into the more fantastic side of science fiction. (Contrast that with "harder" science fiction like 2001, which doesn't want to get too far into the "technology is just like magic" discussion.)
Space opera really came of age with the works of Jules Verne, H.G. Wells and Edgar Rice Burroughs, as well as old movie serials from the 1930s like Buck Rogers and Flash Gordon. (All of those informed George Lucas when he made Star Wars, as well as Gene Roddenberry's approach to Star Trek.)
They harked back to older myths and legends like Greek and Norse mythology—gussied up in future tech and set loose in the cosmos, but otherwise touching on the same tropes as a much older kind of storytelling.
That brings us to the movie's other big genre: adventure. In part, that comes with space opera, since space opera always features mighty deeds to do and cunning foes to defeat. But Nicholas Meyer also wanted to evoke the Napoleonic adventure stories of the 19th century, when characters like Horatio Hornblower and young Jim Hawkins went up against the scurvy dogs of the high seas.
It wasn't hard to shift that dynamic to Starfleet's jumped-up hot rods and bring old-fashioned naval adventure stories into a fresh new location. Space opera may be Star Trek II's main course, but adventure is definitely its all-you-can-eat salad bar.