Barbara was a delusional creation of Martin Bannister.
When Bannister was in a nursing home, he began to confuse fantasy and reality. He started to believe he was Doctor Who, the character he had written a television pilot about decades previously. In the fantasy, he travelled in his TARDIS with Susan (based on his second wife Amy), Ian (based on his son Philip) and Barbara (based on his nurse at the home). He eventually succumbed completely to the fantasy. (AUDIO: Deadline)