Luis Suarez put the visitors ahead in the 11th minute, but Vallecano looked like they would record just their second win of the season as Jose Pozo and Alvaro Garcia netted either side of the interval.
The Catalan giants produced a stirring last-gasp comeback, though, with Ousmane Dembele drawing them level in the 87th minute and then Suarez delivering the decisive blow three minutes later.
Any hopes Vallecano had of containing their illustrious opponents – 5-1 El Clasico victors last weekend – were obliterated after just 11 minutes.
Jordi Alba latched onto Ivan Rakitic's stunning cross-field pass and pulled the ball back for Suarez to slot in his eighth league goal of the campaign from six yards.
The hosts should have drawn level just after the half-hour mark, Pozo firing wide from 10 yards after a blistering counter-attack had torn Barca's backline apart.
The former Almeria man made amends 10 minutes before the interval, however, whipping a wonderful strike in off Marc-Andre ter Stegen's left-hand post from 25 yards.
Barca came agonisingly close to restoring their advantage moments before the break when Suarez's curled effort crashed off the outside of the upright.
That near-miss was brought into sharp focus after 57 minutes when substitute Garcia powered home from close range after Raul de Tomas' header had fallen kindly to him off the post.
Vallecano were unable to hold on for a famous win, however. Dembele pulled Barca level with a crisp half-volley from Gerard Pique's headed knockdown before Suarez stole in at the back post to prod past goalkeeper Alberto Garcia for a dramatic late winner.
What it means? Barca show fighting spirit
It was not pretty, but Barcelona showed enough grit in those final stages to maintain the momentum of their stunning win over Real Madrid. It is five wins on the spin in all competitions now for Valverde's side and with Lionel Messi set to return imminently, it looks ominous for their LaLiga rivals. Vallecano, meanwhile, remain rooted in 19th after just one win all season.
Suarez the difference again
Fresh from his hat-trick against Madrid, Suarez was once again the talisman for his side. The Uruguayan now has nine league goals this season and is showing no signs of slowing down in front of goal.
Rafinha proves ineffective
The Brazilian had a game to forget. Moments after flashing well wide from a good position early in the second half, he was replaced by Dembele, whose fine finish late on set up a remarkable finale.
Barca travel to Inter in the Champions League on Tuesday where they will hope to welcome back Messi from his broken arm, while Vallecano's next match is at home to Villarreal next Sunday in LaLiga.