Ronald Araujo's 90th-minute header rescued Barcelona from a second straight home defeat in Monday's 1-1 draw with Granada.
Barca were in need of a response after going down 3-0 to Bayern Munich in the Champions League but instead ended up fortunate not to lose again.
Granada's most recent LaLiga victory had been at Camp Nou in April – ending a run of 24 straight defeats in this fixture – and they threatened another upset when Domingos Duarte scored early.
Indeed, there were only 49 seconds of normal time remaining when Araujo saved the day in front of an angry crowd, keeping Barca unbeaten in the league but scarcely easing the tension.
Less than two minutes were played when Sergio Escudero crossed beyond Marc-Andre ter Stegen to the far post and Duarte's downward header found the net.
Ter Stegen was beaten again by a Jorge Molina volley that just cleared the crossbar, before Barca belatedly applied some pressure at the other end.
Second half
Sergi Roberto hit the angle of post and crossbar at the second attempt following a corner, while only a sublime Luis Maximiano save denied Araujo after a firm header.
The hosts were slow out of the traps again after the restart, though, and it appeared as though a remarkable Luuk de Jong miss 11 minutes from time would prove costly.
Bizarrely pitched as "more dangerous than Neymar" from crosses by Ronald Koeman, the on-loan striker nodded over from point-blank range. However, Araujo soon thundered in his own header from a similar position.