This is a Saturn V! Although from which mission I'm a bit uncertain of. Note however in the first two images, the photos have been stretched vertically by an incredible proportion, making the vehicle look preposterously tall.
Given this episode was filmed in January 1968, this places some upper bounds on what specific vehicle we're seeing here. It's either:
- SA-500F, first vertical: May 25, 1966 (at LC-39A). Fit checks.
- SA-500D, first vertical: ~1966. Vibration checks.
- SA-501 (Apollo 4), first vertical: Unknown. Launched: November 9, 1967.
- SA-502 (Apollo 6), first vertical: March 17, 1967. Launched: April 4, 1968.
- SA-503 (Apollo 8), first vertical: December 20, 1967. Launched: December 21, 1968.
All five of these vehicles were erected on LC-39A specifically.
The unofficial Star Trek wiki has this to say about the episode:
The rocket stock footage in this episode is actually of three Saturn Vs: footage of the rocket on the ground is a combination of the SA-500F Test Vehicle (the only Saturn V to feature "USA" markings on the third stage) and Apollo 6 (the only Saturn V launched with a white service module). Footage of the rocket launching is of Apollo 4.