Gardiner was suspicious of the Third Doctor and Jo's intentions on board the ship. Accordingly, he had them almost immediately placed in the brig, and alerted his superior, General John Williams, about the "stowaways". He later delivered the Doctor and Jo to a holding cell on Earth, prior to their initial meeting with General Williams and President of Earth Dora. He offered to get them some food, then advised them to tell the truth quickly to Williams, so as to avoid having the mind probe used on them. (TV: Frontier in Space)
Behind the scenes
According to the novelisation, but not to the episode as televised, his rank is that of captain.