Goals from Matty Kennedy and substitute Callum Hendry rescued a draw when it looked like the Lions were cruising to victory.
First-half strikes from Scott Pittman and Steven Lawless earned Livingston a deserved lead before Saints – hammered 7-0 by champions Celtic on the opening day of the season – stirred themselves after the break.
However, Lyndon Dykes could have snatched victory for the visitors in the last minute, only for Zander Clark to save his poorly-hit penalty.
Livingston could not have wished for a better start to the match as they sought to build on the previous week's goalless draw with Motherwell.
There were only 12 minutes on the clock when they earned the breakthrough.
Aymen Souda combined with Marvin Bartley in the centre of the Saints half before feeding Lawless on the right flank.
The winger's loss cross picked out Pittman arriving with perfect timing 12 yards out and he hammered home.
The midfielder then came close to doubling Livingston's lead in the 22nd minute.
The 27-year-old tricked his way into the box before unleashing a powerful effort that Clark did brilliantly to turn away for a corner.
But the Lions did extend their advantage six minutes from the interval.
A Saints misunderstanding sparked a Livingston counter-attack and after Nicky Devlin's mis-hit shot the visitors kept the ball alive.
Eventually, they found Lawless in space at the edge of the box and the attacker drilled a left-foot effort into the bottom corner.
The half-time break afforded St Johnstone manager Tommy Wright time to organise and revitalise his side but it was Livingston who threatened first after the interval.
Devlin latched on to a knock-down from Ricki Lamie but his shot on the run sailed too high.
And within two minutes, Saints had pulled one back.
The visitors got into a mess dealing with a Saints counterattack and Kyle Jacobs was short with a pass-back.
Michael O'Halloran won the race with Lions keeper Ross Stewart and Kennedy applied the finish.
The goal boosted morale in the Saints ranks and the home side committed men forward in search of the equaliser.
Only a magnificent last-ditch tackle from Bartley denied O'Halloran in the 76th minute and five minutes later the McDiarmid Park side drew level.
Stewart had initially repelled Chris Kane's close-range shot but Hendry hammered in the rebound to complete the comeback.
There was still time for one last moment of drama in the final minute of an incident-packed game.
Richard Foster was deemed guilty of pushing over Dykes from behind but Clark was equal to the striker's weakly-hit spot-kick.