Adam Matthews' first goal for Celtic proved just enough to send Neil Lennon's team into the fifth round of the William Hill Scottish Cup but their 1-0 replay win over Arbroath also owed much to a controversial disallowed goal by Steven Doris.
Matthews fired a wonderful strike from 20 yards in the 19th minute but Celtic subsequently failed to take control at Gayfield. And they were grateful for a 66th-minute decision by referee Craig Charleston, who presumably ruled out Doris' close-range finish for an earlier infringement on Celtic goalkeeper Fraser Forster, but a foul did not appear obvious.
Forster himself averted extra-time when he saved a one-on-one with Connor Birse as Celtic edged through to set up a trip to Raith Rovers.
Georgios Samaras got the first effort on target with a header from Lassad Nouioui's cross but it was straight at home goalkeeper Scott Morrison. The Greek soon returned the favour after a backheel from Scott Brown, sending over a low cross that Lassad swept home but the offside flag was up.
Arbroath were the architects of their own downfall though when Matthews won the ball off left-back Colin Hamilton following a pass from Paul Sheerin. The Wales international burst away but still had plenty to do, and lashed a powerful strike that flew over Morrison's outstretched hands and into the far top corner.
Celtic only had one more chance of note in the first half when Samaras set up Lassad after a wonderful diagonal ball from Charlie Mulgrew. But the Tunisian failed to produce an emphatic finish from eight yards and Morrison blocked the bouncing effort.
Paul Currie and Brown fired wide at either end and Celtic were soon stretched again before Emilio Izaguirre headed away under pressure following Sheerin's cross. Sheerin soon caused more problems with the corner that led to the contentious decision to chalk off a goal.
The Arbroath player-manager delivered the ball right into the heart of the goalmouth and Forster could not collect. Hamilton won the high ball and headed down towards goal with Doris forcing the ball home on the line. But Charleston, who was standing on the edge of the box, signalled for a free-kick.
There was another major escape when Connor Birse won the ball in the middle of the Celtic half and took a return pass from Doris that sent him clean through. But the substitute was quickly closed down by Forster, who got just enough of his diving body in the way of the shot to divert it wide.
Lennon was growing increasingly frustrated with his side's slack passing and Forster was soon scrambling again as Currie fired just wide from long-range. And the visitors were grateful again for the sound of Charleston's whistle at the end of three minutes of injury-time.