Peter Enckelman saved Kris Commons' penalty after three minutes and the Saints goalkeeper went on to enjoy a fine afternoon with a string of saves.
Mackay's deflected shot on the hour mark sealed a miserable day for the Parkhead side who hit the woodwork through Commons and substitute Paddy McCourt.
Defeat adds to manager Neil Lennon concerns ahead of Thursday night's Europa League play-off second leg against Sion in Switzerland following their goalless draw in the first game.
First of all he may have to address the subject of penalties, an on-going problem for Celtic.
Anthony Stokes, Georgios Samaras and Gary Hooper all missed penalties last season with the latter also missing at Hibernian on the first day of the season.
However, there was more to Celtic's defeat than the penalty miss but the Saints players could not have cared less as they took the acclaim of their fans at the end.
The dropping of striker Samaras, who bore the brunt of the criticism from the Hoops fans during the first-leg clash three days previously, was expected but perhaps more surprisingly both full-backs Mark Wilson and Cha Du-ri also started on the bench.
New signing Victor Wanyama came in to make his SPL debut alongside Daniel Majstorovic at the heart of the Celtic defence with Shaun Maloney making his first start of the season and Adam Matthews in at right-back.
St Johnstone also showed three changes with Kevin Moon, Marcus Haber and Carl Finnigan out and Callum Davidson, Alan Maybury and Francisco Sandaza coming in.
Celtic had the chance to take the lead in the third minute when they were awarded a penalty by referee Brian Winter after he adjudged Enckelman to have up-ended Stokes in the box after the Irishman had raced through on to a fine Matthews pass.
The Saints goalkeeper made up for his transgression, however, by diving to his right to save Commons' spot-kick.
Celtic shrugged off the missed opportunity to pin St Johnstone back and Stokes drilled an angled-shot past the far post after working some space for himself inside the Saints' box.
It was one-way traffic and Enckelman smothered Charlie Mulgrew's right-footed drive at his near post.
Seven minutes from the break Ki Sung-yueng's long-distance drive was deflected just past the post but the home side could not capitalise on the corner.
Moments later, when Saints midfielder Murray Davidson fouled the South Korean 25 yards out, Commons struck the post with his flighted free-kick.
Celtic were getting closer and had another chance a minute from the break when Stokes was slipped in by Joe Ledley but Enckelman dived at his feet to make a crucial save and keep the visitors on level terms going in to the second half.
Wilson replaced Mulgrew for the start of the second half and Celtic resumed their control of the game.
But Enckelman was proving to be inspired and the Parkhead men were fortunate not to concede in the 55th minute in a rare Saints' attack.
Maybury's swirling cross to the back post was met by Liam Craig who steered it back across the six-yard box but Sheridan arrived just too late to slide it in to the empty net.
Enckelman proved his worth again moments later when he made a good block from Stokes' close-range header after the former Hibernian striker had leapt to reach Commons' cross.
Then Hoops keeper Fraser Forster made a decent block from Jody Morris' drive but on the hour mark the visitors took a sensational lead.
When Craig's ball from the left arrived at Mackay at the far side of the box, the Saints defender drilled the ball towards goal and it appeared to take a nick off Murray Davidson before speeding past Forster.
McCourt came on for Commons to provide some much-needed inspiration but the anxiety which had gripped Celtic Park and the home defence looked like helping Saints grab their second.
The Parkhead men stepped up the pressure though, and McCourt side-footed a shot against the post after weaving his way in to the St Johnstone box before Enckelman made another good save from a Stokes header.
There was another penalty claim when Stokes went down under a challenge from Mackay in the box but Winter ignored it.
In the 83rd minute Callum Davidson tripped McCourt 20 yards out but Maloney fired the free-kick wide to sum up a miserable afternoon for the home side.