"It is part of the lay that is called The Fall of Gil-galad"

The Fall of Gil-galad tells the story of the Last Alliance of Men and Elves, where Gil-galad aids in the overthrow of Sauron and is himself slain.  Written in an ancient tongue, it was translated by Bilbo Baggins and taught by him to a young Samwise Gamgee.