UNIT's moonbase is first mentioned in Death Comes to Time; the Brig leads UNIT's spacefleet from there into battle against the invasion force of General Tannis.
One thing worth noting here is that while the BBC has never made a firm edict as to what constitutes official canon (unlike Paramount and Star Trek), there are a few exceptions. One is the Scream of the Shalka webcast with Richard E. Grant as the Ninth Doctor, and I think Death Comes to Time is the other, due to its ending (but someone please correct me if I'm wrong). So whether the UNIT base mentioned in that one actually counts is a matter of debate. Otherwise it could be argued that UNIT could have sent people to investigate when that hospital ended up on the moon in "Smith & Jones".
Alex