Real dominated the first half and should have led when Mesut Ozil struck the bar from six yards.
But Gonzalo Higuain put Los Blancos ahead before the break with a slick finish from Angel di Maria's through ball.
Getafe hit back through Juan Valera's header before Barrada capped a fine counter-attack with the winner.
To compound their miserable start to the season, Real Madrid's Fabio Coentrao, an unused substitute, was shown a red card for something said to the fourth official during injury time.
Having seen Lionel Messi strike twice to snatch victory for rivals Barcelona at Osasuna earlier in the evening, Real Madrid started strongly at Getafe as they looked to secure a first win of the campaign.
But for all the pressure Jose Mourinho’s side exerted in the early stages, all they had to show for it was Ozil’s glaring miss from six yards.
Cristiano Ronaldo drove into the box and exchanged a neat one-two with the German, but when Ozil got it back from the Portuguese he struck the bar when it was easier to score.
It was a huge miss - but Los Blancos soon moved ahead courtesy of Higuain.
Some have suggested that the imminent arrival of Tottenham’s Luka Modric could marginalise Di Maria, but the Argentine proved his worth with an incisive through ball to create the opener.
Latching onto the neat pass, Higuain darted between Getafe centre-backs Alexis and David Abraham, and assuredly carried the ball around goalkeeper Miguel Angel Moya and stroked into the empty net.
Getafe had shown very little attacking threat until that point, but responded well to going behind – and should have levelled when Iker Casillas failed to punch clear a corner from the left, only for Abraham to put his header wide.
But the Azulones showed more attacking intent in the second half and were rewarded eight minutes after the restart when Valera sneaked between Sergio Ramos and Xabi Alonso, who was carrying an injury picked up at the start of the half, to bury his header into the bottom corner.
The goal was the wake up Real needed and they threatened to re-establish their lead when through an off-colour Ronaldo and substitute Karim Benzema, but both were thwarted by Moya.
Mourinho made a tactical change that would prove his side's undoing, replacing Brazilian Marcelo with Jose Callejon as he changed to a three-man defence.
Moments later Getafe substitute Adrian Collunga collected a long ball and motored at Raul Albiol down the left wing. Collunga was allowed to continue despite a hint of handball, finding Barrada to his right – and the Frenchman fired an unstoppable winner beyond Casillas.
It was a sensational turnaround by Getafe, who resisted a late onslaught on their goal to seal a win that stands out as one of their greatest of recent times.
To compound Mourinho’s misery, Coentrao was shown a red card as tempers flared in the dugouts. Despite being an unused substitute, Coentrao will face a ban as Real Madrid make an unconvincing start to the defence of their La Liga title.