St Johnstone took the lead just before half-time through Steven MacLean, who took advantage of a Craig Gordon error.
The visitors defended stoutly and troubled Celtic on the counter, and MacLean sent a free header wide.
Substitute McGregor saved the champions, though, drilling low and hard into the corner of the net.
The equaliser was a reward for Celtic's relentless pressure in the second half, with Scott Sinclair and Mikael Lustig both hitting the woodwork.
St Johnstone might also have been reduced to 10 men, with MacLean seeming to catch Kieran Tierney in the face with his arm, but the St Johnstone striker was only booked by referee Willie Collum.
The visitors held on to claim their point, though, with defender Steven Anderson and goalkeeper Alan Mannus leading their resistance.
A day of drama had the most unfortunate beginning when Murray Davidson suffered a horrendous head injury in an aerial challenge and collapsed to the floor. The St Johnstone midfielder was knocked out. These were worrying moments as medics from both sides tended to Davidson, taking five minutes to get him on a stretcher and away to hospital, Celtic Park applauding as one as he left.
Thankfully, before the game concluded, Davidson was said to be recovering.
Liam Craig came on to field and his team pressed hard, denying the champions easy space. Even when Tom Rogic - man-marked by Paul Paton - broke free, the visitors scrambled effectively. Leigh Griffiths had a shot into the side-netting, James Forrest had a weak shot easily dealt with.
Saints were comfortable in the beginning. Michael O'Halloran had earlier created Celtic some bother down the left when scampering free and squaring for David Wotherspoon, who shot unconvincingly at Gordon.
The Celtic goalkeeper soon entered the narrative of the game in a very major way. MacLean's goal was a self-inflicted wound by Gordon, who was jaw-droppingly lackadaisical in clearing his line. In gifting St Johnstone the ball, he gave them a present of a goal, MacLean turning it in.
There was confusion, and silence, inside the stadium. Was MacLean offside when he scored? No, said Willie Collum and his assistant. Was Gordon out of his mind in doing what he did? Unquestionably, yes. MacLean hesitated and then celebrated. The hush from the Celtic fans continued awhile.
Celtic, flat by their own standards until they motored later on, mustered something before the break when Sinclair came slaloming in from the left before putting in a tame effort on Mannus' goal. Brendan Rodgers made changes at the break, removing the ineffective Olivier Ntcham and Forrest and parachuting in Jonny Hayes and Stuart Armstrong.
Armstrong had a shot tipped over by Mannus as Celtic pushed to preserve their unbeaten domestic run. They had a mountain of possession, but nowhere near their usual level of accuracy. They pushed forward but lacked their surgical ability to cut open a defence.
On the hour, their chances of salvaging something from the game should have been made all the harder. Saints had a glorious chance to make it two. Brian Easton's cross from the left was met by MacLean, just five yards out from goal. Either side of Gordon and it was in. Instead, he directed his header straight at the Celtic goalkeeper and fluffed the most inviting of chances.
Celtic were a jittery mess whenever they were put on the back foot. How Rodgers must be counting the minutes before his full array of centre-halves are available again. Jozo Simunovic was fit enough to sit on the bench at least.
The game quickly became a contest of Celtic attackers versus St Johnstone defenders. Sinclair was a fine leader for the home team, getting on the ball and dragging them forward. Celtic had a penalty shout turned down, then they had Kieran Tierney dumped on his backside by MacLean. The striker was lucky he wasn't sent off.
With 10 minutes left, St Johnstone buckled and broke, McGregor, a second-half substitute, tried to play a one-two with Sinclair in the Saints penalty box. The ball instead broke off Anderson and into McGregor's path. The midfielder whacked in the equaliser.
Saints were hanging on to the cliff edge by now. Sinclair hit woodwork. So, too, did Lustig. Mannus then denied Hayes from close-range. Saints survived, just. A hard-earned point for Tommy Wright's team, one that keeps their momentum going nicely. For Celtic, a battling response on a difficult day at the end of a fine week.
Match ends, Celtic 1, St. Johnstone 1.
Second Half ends, Celtic 1, St. Johnstone 1.
Corner,  St. Johnstone. Conceded by Stuart Armstrong.
Attempt saved. Jonny Hayes (Celtic) header from the right side of the six yard box is saved in the bottom right corner.
Attempt saved. Jonny Hayes (Celtic) left footed shot from outside the box is saved in the bottom left corner.
Mikael Lustig (Celtic) hits the bar with a header from the centre of the box.
Corner,  Celtic. Conceded by Aaron Comrie.
Corner,  Celtic. Conceded by Aaron Comrie.
Nir Bitton (Celtic) wins a free kick in the attacking half.
Foul by Steven MacLean (St. Johnstone).
Foul by Callum McGregor (Celtic).
Joe Shaughnessy (St. Johnstone) wins a free kick in the defensive half.
Attempt missed. Scott Sinclair (Celtic) left footed shot from very close range is close, but misses to the left.
Scott Sinclair (Celtic) hits the bar with a right footed shot from the left side of the six yard box.
Hand ball by Aaron Comrie (St. Johnstone).
Attempt saved. Tomas Rogic (Celtic) right footed shot from outside the box is saved in the bottom left corner.
Attempt blocked. Scott Sinclair (Celtic) right footed shot from the centre of the box is blocked.
Substitution, St. Johnstone. Denny Johnstone replaces Michael O'Halloran.
Liam Craig (St. Johnstone) is shown the yellow card.
Goal!  Celtic 1, St. Johnstone 1. Callum McGregor (Celtic) right footed shot from the centre of the box to the bottom right corner. Assisted by Scott Sinclair.
Substitution, St. Johnstone. Scott Tanser replaces David Wotherspoon.
Attempt saved. Stuart Armstrong (Celtic) left footed shot from outside the box is saved in the centre of the goal.
Attempt saved. Leigh Griffiths (Celtic) left footed shot from outside the box is saved in the centre of the goal.
Attempt blocked. Callum McGregor (Celtic) left footed shot from outside the box is blocked.
Attempt saved. Leigh Griffiths (Celtic) left footed shot from outside the box is saved in the centre of the goal.
Attempt blocked. Michael O'Halloran (St. Johnstone) right footed shot from the centre of the box is blocked.
Jonny Hayes (Celtic) is shown the yellow card for a bad foul.
Foul by Jonny Hayes (Celtic).
Brian Easton (St. Johnstone) wins a free kick on the right wing.
Steven MacLean (St. Johnstone) is shown the yellow card for a bad foul.
Kieran Tierney (Celtic) wins a free kick in the defensive half.
Foul by Steven MacLean (St. Johnstone).
Attempt missed. Jonny Hayes (Celtic) left footed shot from the right side of the box is close, but misses to the right.
Attempt missed. Nir Bitton (Celtic) header from the centre of the box is just a bit too high.
Corner,  Celtic. Conceded by Steven Anderson.
Attempt missed. Tomas Rogic (Celtic) left footed shot from the right side of the box is close, but misses to the right.
Corner,  Celtic. Conceded by Steven Anderson.
Attempt missed. Stuart Armstrong (Celtic) right footed shot from the right side of the box is just a bit too high.
Attempt missed. Tomas Rogic (Celtic) left footed shot from outside the box is close, but misses to the left.
Corner,  Celtic. Conceded by Steven Anderson.
Callum McGregor's late strike rescued a point for Celtic as they came from behind to extend their unbeaten run in domestic football to 53 games.