Neil Lennon's side dominated proceedings and, with the match appearing to be heading for extra-time, finally secured their passage in the 92nd minute as James Forrest netted the decisive third goal.
After being frustrated for the majority of the first half by goalkeeper Aleksandr Mokin, Celtic finally found a way through with an outstanding 25-yard effort from Kris Commons.
The Bhoys were level on aggregate just three minutes after the restart when Georgios Samaras coolly finished from 10 yards, before Forrest then delighted the home fans in added time.
Lennon made three changes to the side that lost the first leg, with Emilio Izaguirre, Virgil van Dijk and Steven Mouyokolo coming out, and Adam Matthews, Efe Ambrose and Stokes taking their place. Viktor Kumyov, meanwhile, kept faith in the same side that started in Kazakhstan.
|By Matthew Harold
After the disaster in Astana last week, Celtic’s Champions League hopes hung by a thread going into the second leg, but backed by their huge home support, the Scottish champions made a remarkable comeback.
They managed to break down a strong Shakhter Karagrandy defence through Kris Commons' strike just before half-time, but once Georgios Samaras levelled matters after the break the visitors began to exert their own pressure.
Yet Celtic withstood the attacking threat of the Kazakhstani side and with the game deep in injury time, Anthony Stokes' jinking run and James Forrest’s fine finish sent the Celtic Park wild and they can now look forward to the rewards of Champions League football.
The first was a stunning point-blank stop from Mikael Lustig's header in the sixth minute, and the keeper followed that up by palming away Forrest's fierce strike from the edge of the box.
Still Celtic came forward and twice Anthony Stokes had the chance to open the scoring.
First he saw he a drilled close-range effort stopped by Mokin, before the former Sunderland striker saw a header from Commons' cross come off his shoulder, aiding the Shakhter goalkeeper's save to his left.
The home side were further frustrated in the 15th minute when Commons struck a free kick from the left channel that looked destined for the back of the net before Mokin parried it away.
Lennon's team maintained their dominance in possession, but the clear-cut chances began to dry up as the away side defended resolutely.
But the breakthrough finally came in first-half stoppage time when Commons took ownership of the ball 25 yards out from goal and unleashed a fierce left-footed shot that swerved away from Mokin and into the far corner.
Celtic levelled the tie just three minutes after the break as a Celtic corner was only half cleared and Lustig's effort was controlled by Samaras, with the Greece international lifting his strike high into the net to send Celtic Park into raptures.
It should have been three 11 minutes later when a surging run by Forrest led to him crossing to Stokes who somehow managed to volley against the crossbar from six yards.
They were almost made to pay for their profligacy as twice Shakhter came close.
First Fraser Forster flapped at a corner and Mathews cleared an Andrei Finonchenko header off the line, before a scramble in the box after a long throw led to the ball cannoning back off the bar.
Celtic kept probing for the goal that would send them through and Stokes came close in the 88th minute but shot wide from outside the area.
But they would not be denied as the 25-year-old skipped past two challenges before laying the ball into Forrest's path who blasted home the winner and sent Celtic into the group stages of the Champions League.