"Talk to the hand" and the similar "tell it to the hand" are
African-American slang expressions, sometimes part of a longer phrase
such as "Talk to the hand, 'cuz the face ain't listenin'."
I believe the first use of the phrase in a widespread entertainment
medium was by Joan Rivers, who used "talk to the hand" as a sarcastic
catchphrase when she was hosting The Late Show from 1986-1987:
"When comedienne Joan Rivers would get angry with someone, she'd stick
her hand in his face and holler, "Talk to the hand. My ears aren't
listening!"