The Irish striker steps off the bench to help the Parkhead side towards a league and cup double as they book a Scottish Cup final place against Hibernian in May
Two goals from Kris Commons, along with a Victor Wanyama header gave the Hoops their first win in four at the National Stadium, but they were made to sweat as a Gary Mackay-Steven effort and a Jon Daly double set-up an extra half an hour.
Jackie McNamara made only one change to the side that claimed a top six spot with a victory over Aberdeen, with Mackay-Steven starting in place of Michael Gardyne, which meant that youngsters John Souttar and Ryan Gauld retained their positions.
Celtic also made the one change from the team that secured a comfortable victory at home to Hibernian which sees them move one step closer to the SPL title, as young winger James Forrest was brought in, in place of Stokes.
It took just over a minute for the Glasgow outfit to gain the advantage, as Commons picked up possession in the middle of the Dundee United half and strode forward unchallenged before placing the ball beyond Radoslaw Cierzniak for the opener.
Dundee United were given a golden opportunity to get back level after Fraser Forster picked up a pass back from Charlie Mulgrew, which led to referee Craig Thomson awarding an indirect free-kick inside the box, but unfortunately for McNamara’s side John Rankin’s effort cannoned off the wall and was eventually cleared.
Instead of the Parkhead side adding to their advantage, it was Dundee United who managed to find a leveller after a counter-attack found Daly, who held the ball up for Mackay-Steven and the former Liverpool youngster played a one-two with Gauld before curling it beyond Forster.
On the half hour mark the Tannadice side took the lead when Barry Douglas whipped in a free-kick from the right wing, onto the head of Daly, who had got beyond Mulgrew to power his effort into the net.
A minute later however, Celtic got back level when Emilio Izaguirre received a pass on the left hand side and found Wanyama at the back post, with the Kenyan midfielder having the simple task of heading the ball home.
Just before the hour mark Celtic regained the lead as once again Izaguirre was instrumental with his play down the left wing, the Honduran playing a cross into the box that seemed to hit off Commons and unfortunately for Cierzniak, he couldn’t prevent the ball from landing in the goal.
After almost going two behind Dundee United immediately levelled things up, after a superb cross from the left by Mackay-Steven was met at the back post by Daly, who bulleted his header beyond Forster to set-up extra time.
But Celtic gained the edge in extra time as with five minutes left in the first period substitute Stokes managed to get onto a ball from the right by Forrest.
And despite some late pressure from the Tannadice side, the SPL leaders managed to hold on and move one step closer to a domestic double.