Original: The origin of the lyrics is a poem by diplomat Cecil Spring-Rice which he wrote in 1908 whilst posted to the British Embassy in Stockholm.
Simplified: In 1921 Gustav Holst changed the music from a section of the song Jupiter from his suite The Planets to create a setting for the poem.