One morning author Alan Sillitoe was sitting looking out of his window and saw a youth jogging past. So inspired, he wrote the phrase 'the loneliness of the long-distance runner'.
Comeleon's right. I actually asked Alan Sillitoe, and he confirmed the story, adding that a year or so later ,while living in Spain, he came across the piece of paper with the phrase on it and then started the book. So, unusually, the title came first and the story followed.