"Dumbledore's Farewell" by Nicholas Hooper
"Dumbledore's Farewell", composed by Nicholas Hooper for Harry Potter and the Half-Blood Prince, is connected to Desplat's "Severus and Lily" track, which plays during the "Prince's Tale" sequence.
Nicholas Hooper composed the musical scores for Harry Potter and the Order of the Phoenix and Harry Potter and the Half-Blood Prince, both of which were directed by David Yates. Composer Alexandre Desplat was hired to compose the music for Harry Potter and the Deathly Hallows: Parts 1 and 2. When Yates was making Part 2 he chose to include "Dumbledore's Farewell" from The Half-Blood Prince, one of Hooper's most popular pieces of Harry Potter music, right after Desplat's "Severus and Lily" track, creating one long track for that scene.
This was done partly because Yates enjoyed the track "Dumbledore's Farewell" from the sixth film so much, but also because he wanted the music for this, the final Harry Potter film, to bring back some of the musical themes from the previous films for nostalgic effect. For example, Alexandre Desplat makes loads of references to Hedwig's Theme, the primary theme for the series, composed by legendary film composer John Williams.
Critics have claimed that this has added strongly to the deep, moving feelings made and the sense of hope given to the audience.
The final scene, set 19 years later on Platform 9 and 3/4, features the track "Leaving Hogwarts" from The Sorcerer's Stone, followed by the the end credits concert arrangement of "Hedwig's Theme", both composed by John Williams.
Desplat spoke of the use of Williams's theme in Part 2, saying, "Well, we all know there's one theme, which has become iconic, Hedwig's Theme from John Williams. This theme is crucial to the success of the story, and it would have been disrespectful and stupid for me not to use it at the crucial moments where we need to refer to these ten years of friendships that we've all had with these characters and kids, so 'Hedwig's Theme' does reoccur a lot more [than] in Part 1
Richard's answer is great, but since his link was broken and I'm a huge film music fan, I figured I'd elaborate a little more on how it all happened.