Sergio Ramos, who was sent off in stoppage time for a second yellow card, gave the visitors the lead before Willian Jose appeared to have earned a memorable draw for the hosts with a late leveller.
And although Casemiro then nodded home the winner it does little to disguise a desperately poor performance from Zinedine Zidane’s men, who were outplayed and had keeper Keylor Navas to thank for several saves.
The hosts squandered a huge early chance to take the lead after a rare error from Luka Modric gifted possession to Willian Jose on the edge of the area, but the home team striker hesitated before shooting and allowed Navas to close the angle and make a good save.
Las Palmas had another near miss as winger Momo fired over from a narrow angle, while Madrid’s first opportunity fell to Cristiano Ronaldo after a pass from Isco, but his tame shot was easily saved by Javi Varas.
An even clearer opening came Ronaldo’s way when he was released clean through by a brilliant pass from Modric, but the Portuguese star sent his effort too close to the goalkeeper and Varas saved.
The deadlock was broken from the resulting corner, however, as Isco’s left-wing delivery to the near post was met by Ramos, whose bullet header into the top far corner gave Varas no chance whatsoever.
Even so, it still comes as something as a surprise to hear Real Madrid boss Zinedine Zidane confess he doesn’t know whether he will be in charge next season, as the French icon did Saturday in an attempt to quash transfer speculation.
Over the last few weeks a host of big names, including Paul Pogba, Pierre-Emerick Aubameyang, Robert Lewandowski, Eden Hazard and David De Gea have been tipped to make moves to the Bernabeu.
But Zidane delivered an unexpectedly strong attempt to dismiss the rumours as he said: “I’m not planning anything. I don’t even know what’s going to happen on Sunday, apart from we’re playing a game. I might not even be here in the summer. I can’t tell you anything. I don’t know which role I will have or whether I’ll be here.
“There’s always a lot of talk and that’s normal, but I’m concentrating on the games. We’ll see at the end of the season.”
Zidane’s side will tonight attempt to prolong their faint title hopes by clinching three points with a testing trip to Las Palmas, who have roared out of the relegation zone with three consecutive victories.
In late October a group of Barca players celebrated their win at Getafe by donning Halloween costumes and running around the stadium’s backrooms and were condemned for a supposed arrogant attitude towards their hosts.
And on this occasion they appeared hell-bent on making Getafe pay for what they felt was unwarranted criticism, delivering a determined and relentless masterclass in devastating football to tighten their grip on top spot with their 12th consecutive league win.
Although the goals were spread around, the chief tormentors were Lionel Messi and Andres Iniesta, drifting inside from the right and left flanks to wreak havoc.
The opener was crafted by Messi, whose beautiful pass allowed Jordi Alba to deliver a low cross which was deflected into his own net by Getafe’s Juan Rodriguez.
Messi then managed to miss yet another penalty, seeing his low shot saved by Vicente Guaita after Neymar had been fouled, but the second goal wasn’t long in coming as Iniesta and Messi combined to tee up Munir, replacing the rested Luis Suarez, for a simple header.
With Barca toying with the visitors, who barely escaped their own half, Gerard Pique hit the bar before Neymar added the third, running onto another pinpoint Messi pass.
The only thing missing as the interval approached was a goal from Messi, and he duly obliged with another memorable strike as he received a pass and turned to arrow an unstoppable 20-yard strike into the bottom-right corner.
The goal-fest continued in the early stages of the second half as Messi sliced open Getafe’s defence with another brilliant pass for Neymar to grab his second, and then it was six as Arda Turan recorded his first goal at the Nou Camp with an overhead kick from a corner.
Barca lost much of their penetration after Iniesta was substituted and Getafe even managed their first shot on target through Moi Gomez, before Neymar missed two late chances to complete his hat-trick.