The subject of this article:
"Imagine" is a song by John Lennon. Forrest Gump accidentally inspired the lyrics to the song while describing to Lennon the condition of the people in China after his return from ping-pong diplomacy.
It is implied that Forrest accidentally inspires the lyrics to this song. After Cavett introduces Forrest and Lennon to each other, he asks Forrest what China was like. Forrest says "Well, in the land of China, people hardly got nothing at all," and Lennon asks "No posessions?" Forrest then says "And in China, they never go to church," to which Lennon says "No religion, too?" Here, Cavett interjects "Hard to imagine", but Lennon says "Well, it's easy if you try, Dick." All three of these spoken phrases by Lennon are worked into the famous song.
Though "Imagine" is strongly implied to have been part of the story of the Forrest Gump film, the song does not actually appear in the film at any point, and thus is not considered to be on the soundtrack.