Derived from the Comedie de L'arte, the facepalm gesture signified a change of humour based on a realization, a change of mask, to put on a new face.
The gesture became a standard trope of grief or weeping in theatre but when used comedically, indicated a shared misfortune. Imported into Vaudeville, the Three Stooges' innovated the gesture as a surrealistic form of violence, indicating surprise, fear and disdain.
The completed gesture was a stock expression in newspaper comics and used in animated films, exaggerating a sense of mock tragedy or comic disbelief.
Curly facepalmed himself when he saw the ghost, then peeped through his fingers to see if it was still there. Instead Moe was standing there, and asked "Whats the matter with you?" and tried to poke Curly in both eyes with his fingers. Curly defended by turning his facepalm into a noseshield which caught Moe's poke. In retaliation, Moe doubled Curly over with a punch in the stomach and straigtened him up with a fist to the head. It was then that Moe saw the ghost and both facepalmed, peeping through their fingers. Instead Larry was standing there asking "Where did you guys go?" etc.
From the 1974 Roman Polanski film written by Robert Towne and starring Jack Nicholson. Chinatown refers to a situation in which helping makes things worse; an unintended consequence the exact opposite of what was desired; a trauma that keeps repeating itself; a character flaw that keeps re-emerging.
"Aid Syrian rebels and stop Assad? Forget it, the whole region is Chinatown."