“Gimli, Glóin’s son is renowned, for he was one of the Nine Walkers that set out with the Ring; and he remained in the company of King Elessar throughout the War. He was named Elf-friend because of the great love that grew between him and Legolas, son of King Thranduil, and because of his reverence for the Lady Galadriel.
After the fall of Sauron, Gimli brought south a part of the Dwarf-folk of Erebor, and he became Lord of the Glittering Caves. He and his people did great works in Gondor and Rohan. For Minas Tirith they forged gates of mithril and steel to replace those broken by the Witch-king. Legolas his friend also brought south Elves out of Greenwood, and they dwelt in Ithilien, and it became once again the fairest country in all the westlands.
But when King Elessar gave up his life Legolas followed at last the desire of his heart and sailed over Sea.
Here follows one of the last notes in the Red Book:
We have heard tell that Legolas took Gimli Glóin’s son with him because of their great friendship, greater than any that has been between Elf and Dwarf. If this is true, then it is strange indeed: that a Dwarf should be willing to leave Middle-earth for any love, or that the Eldar should receive him, or that the Lords of the West should permit it. But it is said that Gimli went also out of desire to see again the beauty of Galadriel; and it may be that she, being mighty among the Eldar, obtained this grace for him. More cannot be said of this matter.”