Celta led 2-0 with nine minutes to go thanks to strikes from Jorgen Strand Larsen and Tasos Douvikas.
However, two brilliant goals from Robert Lewandowski in the space of four minutes saved Barcelona’s chances.
Cancelo capped up the comeback by meeting a Gavi pass and drilling a calm volley beyond Ivan Millar.
Barcelona now leads La Liga by a goal differential over Girona, with both teams on 16 points.
Celta’s Luca de la Torre, Iago Aspas, and Jonathan Bamba routinely caused problems for Barcelona’s defense.
Xavi’s men, on the other hand, were tenacious, sending waves of assaults against the visitors’ backline until it finally gave way.
If Real Madrid beats Atletico Madrid in Sunday’s Madrid derby, they will return to the top of the standings and move two points ahead of Barcelona.