I don't know what the movie showed, but this is very clear in the book.
This is Gimli's first reaction to Galadriel (book 2, chapter 7):
She looked upon Gimli, who sat glowering and sad, and she smiled. And the Dwarf, hearing the names given in his own ancient tongue, looked up and met her eyes; and it seemed to him that he looked suddenly into the heart of an enemy and saw there love and understanding. Wonder came into his face, and then he smiled in answer.
Gimli himself explains why he wants a strand of hair:
‘Treasure it, Lady,’ he answered, ‘in memory of your words to me at our first meeting. And if ever I return to the smithies of my home, it shall be set in imperishable crystal to be an heirloom of my house, and a pledge of good will between the Mountain and the Wood until the end of days.’
You'll see more of that in book 3 chapter 2, when Gimli reacts to Éomer's less-than-gushing description of Galadriel:
You speak evil of that which is fair beyond the reach of your thought,
and only little wit can excuse you.
In short, Gimli is smitten.