Kelechi Iheanacho's first goal for six months sealed the vital victory at Dens Park, lifting third-placed Celtic within three points of Hearts.
Iheanacho battled Dundee's Ryan Astley to control fellow substitute Marcelo Saracchi's cross and fire home from six yards in the 82nd-minute.
Celtic had lost in all three previous trips to Dundee this season and looked like they might slip up again when Simon Murray equalised from a VAR-assisted penalty in the 57th minute.
Steven McLean ultimately pointed to the spot after Astley hit a bouncing ball off the outstretched arm of Colby Donovan.
Dundee had rarely threatened before then and had fallen behind when Yang Hyun-jun got the final touch in an eighth-minute attack.
Celtic missed a series of chances before the leveller but Iheanacho's long-awaited goal was soon followed by a red card for Astley as Martin O'Neill's side climbed back into the title race.
Earlier, Hearts boss Derek McInnes was left to rue his team's sloppy display at bottom of the table Livingston.
The Jambos are just one point clear of second-placed Rangers, who won 4-2 against Dundee United on Saturday to briefly take pole position for the first time in more than two years.
Backed by 7,000 fans at Almondvale, Hearts were stunned early on when Stevie May fired Livingston ahead.
The Edinburgh side hit back with goals from Lawrence Shankland and Claudio Braga.
But Craig Halkett's pass to Islam Chesnokov was intercepted, leading to Lewis Smith's 58th minute equaliser.
Hearts' frustration was compounded in stoppage-time when Marc Leonard was sent off for denying Robbie Muirhead a goal-scoring opportunity.
"Absolutely two points dropped. We lost two really poor goals. We came here with a lot of motivation, the fans turned up and I thought we looked ready for that," McInnes said.
"We should just be looking after the ball and staying in charge of the game, but we were guilty of giving up that control and authority.
"When you lose the goal, even with half-an-hour to go, psychologically it changes because we then have to try and go again. Livingston then, as a team at the bottom of the league, have something to hang on to."
