Normally I get told that I look young, but I have a bad habit of hitting on older girls...
Check for the tell tale signs- breaking eye contact, touching her face, closing her body etc etc..
Girl: I'm 20
You: Really? You look a bit younger, maybe 18...
Otherwise, if you find out afterward, just tell her straight that she lied to you and she's too young. Even if she isn't too young, be firm, but tease her:
Girl: Im actually not 20, I'm 18
You: Ahh, you're still a kid

but seriously, dishonesty isn't too charming.