After Atletico lost to Sevilla FC on Sunday, Barca looked set to spurn the chance to turn up the heat on the La Liga leaders until Dembele's dramatic 90th-minute strike earned a hard-fought three points.
Both sides hit the woodwork in an end-to-end first half. Kenan Kodro hit the bar for Real Valladolid, who were missing several players due to a coronavirus outbreak at the club, and Pedri saw an effort tipped on to the post at the other end by Jordi Masip.
Barca turned the pressure up late on, though, when Oscar Plano was sent off for a cynical foul on Dembele and Ronald Koeman's side eventually made their numerical advantage count.
Television cameras showed Lionel Messi giving a pep talk in the tunnel at halftime.
"We have to step it up a gear," he said to his teammates. "We have to win this however we can."
At this stage of the season, with the title race now so tight (Real Madrid are just two points back from Barca), performances often go out the window with results all that count. Returning from the international break, Barca were sluggish against Valladolid, but they got the job done. They're now 19 games unbeaten in the league going into Saturday's Clasico against Madrid.
Messi and Frenkie de Jong also managed to avoid bookings that would have seen them suspended for that trip to Madrid.
The performance was a step back following the 6-1 blitzing of Real Sociedad prior to the international break. Barca will hope the win will serve to blow away the cobwebs before the Clasico. Antoine Griezmann's role in the team is the main cause for concern.
Manager rating out of 10
6 -- Koeman stuck with the same team and shape that has served him so well in recent weeks, but it was perhaps a night to introduce one or two changes. Was active in the second half, making four substitutes in an attempt to open up Valladolid.
Player ratings (1-10; 10 = best. Those introduced after 70 minutes get no rating)
GK Marc-Andre ter Stegen, 6 -- Didn't have much to do but there were some nervous moments as Valladolid hit the woodwork and looked dangerous on the counter.
DF Oscar Mingueza, 6 -- Booked for stopping a Valladolid counter in the first half before being replaced by Araujo after the break.
DF Frenkie de Jong, 6 -- Started at the back before moving into midfield. Always looked to drive forward and create something.
DF Clement Lenglet, 6 -- Has improved in recent weeks following a tough spell.
MF Sergino Dest, 6 -- Wasn't afforded much space on the right and Barca struggled to open the game up to get the best out of their full-backs.
MF Sergio Busquets, 6 -- Kept the ball well but wasn't as creative as he's been in recent months. Came off in the second half.
MF Pedri, 7 -- Pressed well and hit the post in the first half, when he was Barca's best player.
MF Jordi Alba, 6 -- Let off the hook when VAR ruled his accidental handball wasn't worthy of a penalty. Not at his best in the final third, where his decision-making let him down.
FW Antoine Griezmann, 5 -- Worked hard but ineffective in attack. Headed his best chance wide of the target with the goal gaping minutes before coming off midway through the second half.
FW Lionel Messi, 6 -- Came close with a second-half strike from 20 yards and played Dembele in for a good chance. In general, though, looked a little rusty after a two week break with no game.
FW Ousmane Dembele, 7 -- Denied by a good Masip save after being fed by Messi on the hour and was later involved in the game's two defining moments. Was hacked down by Plano, who was sent off, when in full flow running forward and then scored the dramatic late winner with a brilliant finish.
DF Ronald Araujo, 6 -- Came on at centre-back but found himself at centre-forward as he won an aerial battle that led to the goal.
FW Francisco Trincao, 6 -- Had a shot saved immediately after coming on but didn't do too much other than that.
FW Martin Braithwaite, 6 -- Provided a wall for the likes of Messi to play off as Barca sought the winner.
MF Ilaix Moriba, NR -- After playing a full game for the B team on Saturday, he replaced Pedri for the final 15 minutes here.
MF Riqui Puig, NR -- Came on for the final three minutes but was involved in the build-up for the goal.