It's a common belief that a part of a person (hair, fingernail clippings, etc.) is needed to work a magic involving them. As Rumpel said, he needed to 'personalise' the potion so it would work for her. I think he dipped the hair in the water. And if he kept the hair, he could use it in the future as well.