If this ever happens to me I usually say something absolutely ridiculous in reply.
For example, there was one girl at my old work who didn't seem to like the way things were going with me, and one day she said 'You smell like a man', and in reply I said, 'Thank you my fine lady; it's a pleasure to know that my subtle masculine musk is slowly winning you over.' I laughed, as did my friends, and she was left with a slightly silly look on her face. It's best not to let them get to you, and I actually found that making my replies funny lightened the mood, and a couple of people have actually changed to real compliments.

I think it's probably about feeling threatened sometimes, and then being put at ease.
Some other examples:
'You have such a pretty face.'
'I'm pretty, you're pretty, what d'you say we go home and stare at each other?' (This is a Johnny Bravo quote; the impression brought it home.

)
'You have a little moustache growing!'
'I know, I'm thinking of naming him Pierre.'
'Well aren't you a gentleman.'
'George of Jungle, only here to help.' (Again, this impression had my friends in fits and the original person put out.)