Livi produced another late show to see off Dundee and secure back to back wins on a controversial afternoon at the Energy Assets Arena.
Dundee came into the match looking for a fourth-straight win to keep up the pressure on early pacesetters Hamilton, but struggled to cope with an energetic start from John McGlynn's side as Stefan Scougall pulled the strings in midfield.
It was Scougall who had the first chance of the game as Andy Barrowman picked the ball up in midfield and played in Scotland under-21 star who drove in to the box and fired in a low shot which Kyle Letheren came out well to block before Wilkie put the rebound wide.
Scougall went close again soon after as he linked up brilliantly with Barrowman and Wilkie only to see Letheren produce another good save to deny him the opener.
Kyle Wilkie missed a golden chance to put Livi in front when he was left totally unmarked in the box but could only steer Keaghan Jacobs' cross, albeit with the aid of a deflection.
The first moment of controversy came when Scougall drove into the box once again and appeared to be pulled back by Ryan Conroy, but referee Craig Charleston, in the first of many puzzling decisions over the course of the match, decided to book the Livi man for diving.
Charleston was once again in the spotlight early in the second half as he denied Livi another penalty when Callum Fordyce's struck the unnaturally positioned arm of Declan Gallagher in clear view of the official.
Dundee had offered little in the way of attacking threat but were handed a golden chance to take the lead when, having denied Livi two fairly nailed-on spot kicks, rubbed salt into the wounds by pointing to the spot when Peter McDonald went down under minimal contact from Fordyce. The chance was spurned though as McDonald dusted himself down it saw his spot-kick brilliantly saved by Darren Jamieson.
The penalty miss sparked Dundee into life and they broke the deadlock on 54 minutes after a kick out from Letheren bounced all the way through to McDonald, who atoned for his penalty miss with a fine volley which fizzed past Jamieson into the roof of the net from ten yards.
Livi came roaring back, though, and were back level less than two minutes later as Wilkie played a corner out to Jacobs at the edge of the box and he took a touch before slamming a tremendous right-footed strike past Letheren from 20 yards to make it 1-1.
Dundee came close to regaining the lead when Wilkie failed to clear and the ball came to Gallagher who fired in a first-time shot which Jamieson did well to hold.
The referee took centre stage again soon after and this time it was Livi who breathed a massive sigh of relief as Jason Talbot barged into the back of Dundee striker Craig Beattie but, inexplicably, the referee didn't award a penalty, instead booking Beattie for his protests.
The visitors then came within inches of the lead as McDonald rose to flick on a corner but Talbot was perfectly placed to head the ball off the line and keep the scores level.
Following that double let-off, Livi set about regaining control and captain Simon Mensing came agonisingly close to giving the Lions the lead when the ball fell to him 15 yards out but his first time shot trickled inches past the near post.
Livi weren't to be denied though and they snatched all three points on 88 minutes as Burton O'Brien's free kick was bravely won by Coll Donaldson and when Letheren could only parry his effort, super sub Martin Scott was on hand to slam the ball into the roof of the net, sending the home crowd wild and securing a richly-deserved win for McGlynn's reborn Lions.
The result lifted Livi into the top half of the table, just a point behind fourth-placed Falkirk ahead of Tuesday's rearranged trip to Raith Rovers.
Livingston: 1 Jamieson, 3 Talbot, 4 Mensing, 5 Fordyce, 7 Jacobs, 8 O'Brien, 9 McNulty (Scott 82), 10 Scougall (Mullen 90), 18 Wilkie (Denholm 68), 19 Donaldson, 22 Barrowman
Subs not used: 16 Beaumont, 17 Walker, 31 Praprotnik, 45 Rutherford
Dundee: Letheren, Irvine, Lockwood, Riley (Boyle 76), MacDonald, Rae, Conroy, Gallagher, McBride, Mcalister, Beattie (Doris 68)
Subs not used: Twardzik, Monti, Thomson, Wighton, Kerr
Referee: Craig Charleston
Match report: Andrew Crawford