The loss, coupled with another Barcelona win, shrunk Real's lead over Barcelona to just two points.
Against Getafe, winger Arjen Robben thought he had scored and led a team celebration despite the fact that the linesman had flagged Raul offside on the play.
While Real players rejoiced, defender David Belenguer took a quick free kick that set up a 4-v-2 counterattack that Nigerian striker Ikechukwu Uche finished.
"The referee could have stopped the move because we had a lot of players celebrating," Real sports director Predrag Mijatovic said. "Perhaps, in these circumstances, he should have stopped play."
Getafe president Angel Torres disagreed. "Soccer is for the smart ones. To say Real lost because of the referee is laughable because the whole of Spain saw what happened on the television."
Click HERE for video of the goal.