Granada handed Barcelona a shocking defeat at the Camp Nou on Thursday night, stopping the La Liga holders from returning to the top of the table for the first time since last June.
Lionel Messi fired Barca in front midway through the first half, beating Granada keeper Aaron Escandell at his far post after Antoine Griezmann played the Argentine in on goal with a clever turn and pass.
Messi just missed a glorious chance to double Barca's lead right before half-time, with Escandell getting a touch on a shot from a tight angle as the hosts took a 1-0 lead into the break.
Granada drew level against the run of play shortly after the hour mark when Darwin Machís pounced on a deflected through ball and smashed a shot past Marc-Andre ter Stegen.
In the aftermath of the goal, Barca boss Ronald Koeman was shown a straight red card for something he said to the officials and was forced to leave the dugout for the remainder of the match.
Jorge Molina headed the visitors into a shock lead as full-time approached, redirecting a cross from Luis Suarez past Ter Stegen to leave Barcelona to chase an equaliser for the last 10 minutes of the match.
"We're really down. We tried until the end but we weren't good enough in the attacking third and they've scored with their two attacks," Barcelona defender Jordi Alba said after the match.
"It was a unique chance to go top after such a tough year. It's not in our hands but we need to win all the five remaining games and see what happens."
The result leaves Barcelona on 71 points from 33 matches, two behind leaders Atletico Madrid, who have 73, and level on points with Real Madrid.
Koeman's red card means the Dutchman will likely miss Sunday's trip to former club Valencia, as well as next weekend's title showdown with Atletico.
Mid-table Granada solidified their spot in La Liga with their first win at Barcelona in the club's history.