Dundee gave Celtic as difficult a match as any team at Parkhead so far this season. After their midweek Champions League exit, Celtic just edged home in a five-goal thriller.
After Mark Fotheringham had countered Henrik Larsson's opening goal, it was not until 20 minutes from time that Bobo Balde restored Celtic's lead.
A further goal by substitute John Kennedy looked to have finished off the visitors, but a goal by Lee Mair in injury time ensured a nervous end to the match for the home team.
Dundee attacked from the start and Rob Douglas in goal for Magnus Hedman, after his midweek blunder, had to save well from Nacho Novo.
Gavin Rae's powerful drive was blocked before Celtic started to find their rhythm.
Larsson opened the scoring with a well taken goal. Balde's pass found Alan Thompson on the flank and his cross was neatly dummied by Chris Sutton before Larsson steered his shot home from ten yards.
Dundee drew level five minutes later. Balde's mistimed header from Julian Speroni's long clearance ended up at Fotheringham's feet and the ex-Celtic player advanced before shooting home from 20 yards off the underside of the bar.
Celtic were rattled and a superb pass by Novo put Fotheringham through again but Douglas saved well.
Speroni blocked a Shaun Maloney effort before another mistake by Balde allowed Rae to find Novo, but the striker could only shoot weakly at Douglas.
Dundee tested Celtic's resolve again at the start of the second half, but Rae failed to get any power in his shot.
With Jamie Smith and Kennedy on as second-half subs, Celtic's efforts were becoming ever more frantic until Balde partially redeemed himself for his earlier mistakes. From Sutton's flick, Balde threw himself to head powerfully home from eight yards.
The game looked over when Kennedy shot home through a ruck of players after Thompson's cross had somehow found its way to him.
Dundee however refused to give in and when Douglas flapped at Garry Brady's corner in injury time, Bobby Linn turned the ball back to Mair who shot high into the net.