Barcelona were left stunned as a goal from Yacine Brahimi gave struggling Granada a vital three points against the reigning La Liga champions in a 1-0 victory.
Brahimi struck in the 16th minute and the home side held on for the rest of the game with a resilient defensive display to thwart Lionel Messi, Neymar and their team-mates.
The result was another disappointment for Gerardo Martino's team after their midweek Champions League exit at the hands of Atletico Madrid.
Now, Barcelona must regroup quickly for the Copa del Rey final against Real Madrid.
Barcelona dominated possession throughout the 90 minutes, but could not break down Granada.
Barcelona appeared to have the upper hand in the opening stages with Lionel Messi and Martin Montoya both going close.
But in the 16th minute Granada stunned their illustrious visitors with the opening goal. Brahimi was set clear by a beautiful long ball from Fran Rico, and the Algerian beat Montoya for pace before firing past Pinto at the near post.
The goal prompted Barcelona and Messi into action, though, and the Argentina ace went close after some great play by Neymar.
In the 21st minute, Granada were calling for a penalty after a Javier Mascherano challenge on Youssef El Arabi inside the area. But the home midfielder chose not to go down, and his honesty may have cost his team.
A minute later, Alex Song freed Montoya down the flank, and Neymar just missed out on a full connection with his cross.
Barcelona continued to press for an equaliser, but Messi, Neymar, Andres Iniesta and Cesc Fabregas were unable to find the target before the interval.
Fabregas forced a brilliant stop from Orestis Karnezis in the 54th minute, when the Greek goalkeeper got down low to his left to reach the former Arsenal star's half-volley from a Neymar cross.
Karnezis was again on hand to deny Barcelona in the 62nd minute, when a curling Messi free-kick threatened to knot the game.
The visitors were struggling to break down the home side, but few could fault their efforts to do so.
Messi was booked for dissent in the 65th minute as the Barcelona frustrations continued to mount against the resilient Granada defence.
Sergio Busquets also found himself in the referee's notebook for challenging a handball decision against him two minutes later.
With 10 minutes remaining, Neymar looked to have equalised from an Alexis Sanchez cross, but his stabbed effort was cleared off the line.
Iniesta was wayward with his effort on goal moments later as the clock ticked down against the La Liga champions.
In the 88th minute, Pinto produced a fine double save from El Arabi to keep Barcelona in the game before Karnezis denied Pedro in the closing stages.
But Granada held on for a famous victory to cap an awful week for Barcelona.
Selected Player Ratings
The forward was constantly looking for the breakthrough against a resilient Granada defence and never gave up.
Lionel Messi: A-
The mercurial Argentina international was another Barcelona star to be thwarted by the home side's backline. His second-half caution was borne of that frustration.
Youssef El Arabi: A-
The Granada striker ploughed a lone furrow for the home team, but held the ball up well when required. He also deserves credit for staying on his feet inside the area when a fall could have earned his team a penalty.
Barcelona renew their rivalry with Real Madrid when they face each other in the Copa del Rey final on Wednesday.
Granada return to La Liga action when they travel to Sevilla next Sunday.