Pep Guardiola's side dominated possession but were out of sorts throughout the clash at the Coliseum Alfonso Perez, and rarely looked like securing the win they so desperately wanted.
And after Madrid's earlier victory against city rivals Atletico, Barca were sent home empty-handed as full-back Juan Valera headed an unlikely winner for Getafe in the 67th minute.
David Villa had an early chance as Barca made a positive start which also saw Lionel Messi go close with a bending free-kick.
The champions continued to probe, with Villa struggling to make progress on the left before Chile international Alexis Sanchez sent a speculative effort into the stand.
Valera offered a decent outlet for the hosts, who were content to sit back and contain Barca while tentatively countering when the opportunity arose.
Barca finally came close in the 36th minute, Dani Alves bursting down the right and cutting the ball back after being found by Messi but Alexis' shot was saved smartly by Miguel Moya.
Alexis saw another attempt deflected over for a corner but Getafe could have ended the half ahead when Diego Castro was found by Miku's cross but Alves did just enough to scupper his chance.
Barca were labouring with clear chances rare, while Valera wastefully shot wide for Getafe as he powered forward in space on the right.
Messi drilled a low effort from the edge of the box which Moya got down to hold, while Alexis appealed for a penalty when he was overpowered by Cata Diaz on the edge of the box.
Getafe landed the sucker punch in the 67th minute and, while it was against the run of play, Barca had nobody to blame but themselves.
Fittingly it was Valera who scored it, capitalising on the visitors' failure to get rid of a routine corner from Pablo Sarabia and powering home the header past Victor Valdes.
Pedro was sent on from the bench and forced a save from Moya with a well-struck shot as the Catalans finally injected some urgency into their endeavours.
The winger should have done better with his next effort, though, as he was found by Xavi's incisive pass.
Sergio Busquets wasted a glorious opportunity when he threw himself down theatrically in the box rather than shoot, cross or pass the ball, and was booked for his stupidity.
Messi put the ball in the net from Seydou Keita's squared ball but the midfielder was ruled to have been in an offside position before playing the ball and the linesman's flag was raised.
The match went to the wire as Messi hit the post and Pedro hit the resulting loose ball wide but Getafe held on for a massive victory.