Nienna the Compassionate was an Ainu of grief, mourning, mercy and pity. During the song of Eru Ilúvatar, her music bore these things into being on Arda, welcoming grief and mercy to Middle Earth. Hers is a lesson of endurance of the spirit, hope, and, of course, pity. Her halls were raised upon the western cliffs of Valinor, and gazed out beyond sea to Walls of Night. She wrapped herself in shimmering gray robes that shined like tears.
When the Two Trees were in creation, her tears watered their roots to bring them life. She would play an important part in the reclamation of Melkor from his three age long imprisonment in the Halls of her brother’s domain, Mandos. While she had wept deeply and mourned the destruction of Arda wrought by her fellow Ainu, she was taken by pity at his begging when he sued for pardon from his sentence. Of all the Valor, Nienna spoke most on his behalf. While his inevitable betrayal must have caused her even greater anguish, the lesson of Nienna is to not regret compassion—but to learn from it.
Melkor left a great ruin, as is his way, when he fled Valinor. The greatest being the destruction of the Two Trees. Nienna wept at their mounds, and while her tears could heal, she could not cure them of Ungoliant’s poisons. However, between the efforts of herself and Yavanna, the Ainu of green life, the trees bore one last fruit and flower, which would become the Sun and Moon.
Of the Maiar in Valinor, her greatest pupil would be the future istar Olórin. She would teach him mercy, pity, and patience—and he would use these lessons to gift wisdom to the Elves in Valinor. He lived by example of Nienna, bestowing mercy upon the Children of Ilúvatar, taking counsel with them and leading them out of despair.
Long after Sauron had come to power and fallen in battle, the Valar chose five of the Maiar to travel to Middle Earth as Istari, to help all those who opposed the shadow of evil in Arda. Olórin was chosen—and would live his life in Middle Earth, in the guise of an old man and wanderer. The Elves would come to call him The Grey Pilgrim, or Mithrandir. The Dwarves would name him Tharkûn. But the Men of Arnor would name him Gandalf. And Gandalf is he.
I think Gandalf wears his grey robes to honor his mentor. And when he returned to Valinor, he went to the Halls of Nienna; and I think, for an age at least, Nienna’s tears weren’t for the grief of Arda, but in joy for her dearest pupil and all that he’d accomplished.