Tenth Planet was aired in 1966. At this time it was still legal to advertise houses as "No blacks", or refuse service in shops. The episode featured a black astronaut, plated by Earl Cameron. This was the first ever TV casting of a non-white actor as an astronaut.
A lot of people complain that Dr Who has become 'too woke', but it appears to have been pushing boundaries almost since the very beginning.