50 years after he began writing one of his most-beloved tracks, the musician shared how the song came to be