Oh, yes! It’s very meaningful. I’ve explained this before but I love this story so much I don’t mind retelling it.
If you’ve read the Silmarillion (or at least heard of it) you’ve probably heard of Feanor, who was primarily known for making the three Silmarils. The Silmarils were three indescribably beautiful and magical jewels that contained the light and essence of the world before it became flawed. (Many people died, lost hands, burned, and perished in pursuit of these jewels. They were very sought after).
It’s said that Feanor was inspired by the beauty of Galadriel’s shining, silver-gold hair. But when he begged Galadriel for a single strand of her hair, she refused him every time. Despite it being the First Age and being relatively young, Galadriel’s ability to see into other’s hearts was still very strong and she could see that Feanor’s heart was full of wrath and greed. She never gave Feanor a single strand of her hair.
Now, in the Third Age, the Fellowship comes to Lorien and Gimli is captivated by Galadriel’s beauty.
When the Fellowship was departing and being bestowed gifts, Galadriel paused before Gimli with empty hands, because she did not know what to give the Dwarf. Gimli doesn’t ask for gold or treasure, but for a single strand of her hair to remember her beauty by.
She doesn’t give him one, but three. Three strands of her hair.
This is why Legolas is smiling in that scene when Gimli tells him what Galadriel’s gift was.
He’s smiling because he knows the significance. He’s smiling because he knows Galadriel looked at Gimli and decided he deserved more than the greatest Elf that ever lived, and twice that.
And it there that both of them consider the possibility that an Elf and a Dwarf can be friends.