Barcelona missed the chance to go third in LaLiga as Antonio Puertas' last-gasp strike salvaged a 1-1 draw for Granada on Saturday.
After Barca had struggled to create first-half chances, Sevilla loanee Luuk de Jong rose to head a Dani Alves cross past a helpless Luis Maximiano to put Barca in front in the second half.
Gavi's late sending off put Xavi's side under pressure and with time running out, Puertas volleyed past Marc-Andre ter Stegen to deny Barca all three points.
While the Catalan giants have lost just once in 10 LaLiga games, they sit only sixth in the table in the battle to secure a Champions League spot.
The Blaugrana thought they had made the breakthrough after just eight minutes, when De Jong headed home Gavi's left-wing cross, but they were denied after a lengthy VAR review established that the 17-year-old playmaker was narrowly offside in the build-up.
Granada looked lively on the break, and Ter Stegen, making his 200th LaLiga appearance for Barcelona, was called into action for the first time on 25 minutes, making an excellent low save from Darwin Machis.
Machis' effort was the only effort on target throughout the first half, with Barcelona failing to turn their dominance of possession into meaningful chances.
Barca led 10 minutes after the restart, with the returning Alves seeing his flighted cross headed home by De Jong at the back post.
A goalmouth scramble had Barcelona hearts in mouths at the 75-minute mark, before Gavi picked up a second yellow for an ill-advised lunge in midfield.
Only one shot on target
Granada piled on the pressure after Gavi's dismissal and Puertas hit a sweet left-footed strike past Ter Stegen in the 89th minute, sparking wild celebrations.
Against an outfit who have now avoided defeat in their last three meetings with Barcelona, Xavi's side produced a controlled performance, but lacked penetration. They had 65 per cent of the possession and spent the majority of the clash in Granada's half, but De Jong's opener was their only shot on target throughout the contest.
On the day that Alves, 38, became the oldest player to make a LaLiga appearance for Barcelona, the returning club icon provided an assist for De Jong's goal.
His pinpoint deliveries will be doubly important upon his return to a Barcelona team that have scored eight headed goals so far this season. That is more than any other LaLiga outfit, and one more than they managed throughout the whole of last season.
Ter Stegen's 200th La Liga appearance put him in esteemed company; he is just the fourth German player to reach the milestone, after Bernd Schuster, Toni Kroos and Uli Stielike. The keeper made a couple of fine stops, and came up with some crucial claims when his depleted side were under pressure late on, but he could do nothing to stop Puertas' equalizer.
Barca will jet out to Saudi Arabia for a Spanish Super Cup semi against fierce rivals Real Madrid on Wednesday. Granada are not in action until they face Getafe on January 20.