Factual error: Trelane has been watching Earth as it was 900 years ago (14th century in the film), but his style is more 17th century, and he mentions Napoleon who lived in the 19th century.
Factual error: The harpsichord Trelane plays is far too short and has pedals like a piano.
Continuity mistake: When the Enterprise tries to escape Gothos, and the planet blocks the ship's path each time, Gothos is very transparent, where the stars could be seen through the planet.
Revealing mistake: When first seen on Gothos, the "frozen" Kirk's eyes blink.
Revealing mistake: As Kirk turns to run on the castle steps, an iron bar barricade appears, blocking his path. When it does, watch the castle wall, and the barricade. It seems to slide just a few inches to line up correctly in the shot, showing poor editing.
Continuity mistake: After swiping at Trelane to score a hit, which Trelane avoids easily, Kirk throws the sword away, which hits a bush as it falls. When Trelane calls up another sword, the bush suddenly stops moving.
Continuity mistake: After DeSalle tries, and fails, to call the ship, he shakes his communicator, and the grille closes, but is opened again in the wide shot.
Other mistake: It's been established the planet is extremely dangerous to human life but when Jaeger, McCoy and DeSalle beam down they just have a simple mouth/nose mask on.
Revealing mistake: As Trelane takes a swipe at Kirk, he hits a tree branch. As it breaks away, the building material it was made from is revealed, rather than it being wood.
Revealing mistake: In Trelane's castle, Kirk and Sulu are supposed to be frozen, but they slightly waver.
Revealing mistake: Just before Kirk finds himself in Trelane's "courtroom", look behind Kirk on the bridge above Spock's work station. The viewscreen with the planet on it is actually a piece of paper that's coming away from the wall.
Answer: Kirk was getting his physical and Dr. McCoy probably turned off communications, because if he hadn't, Kirk would have left and headed straight for the bridge, leaving McCoy irritated.