^I always figured that the Doctor was called that because he got a doctorate from the Prydonian Academy. So he would've been called that well before he left.
And didn't the Gallifreyan version of Clara address him as "Doctor" when she warned him not to steal the wrong TARDIS? That would prove that he did already have the title before he left.
This story, and past stories, have told us that it was more than just a degree. We'd already known that both the Master and the Doctor choose their names. And Smith clarifies that for him it was a promise, not just a simple choice.
He still may have been called that before he left Gallifrey, so it doesn't answer that. It's possible that Clara actually gave him the idea for the name! Here he is, running away, not really sure what he's going to make of his new found freedom, when this young lady addresses him as Doctor, a person who can make people feel better. His inspiration?
We'll have to wait and see!