Livingston won this basement battle scoring two minutes from time with their first shot on target.
It started off well for United. With five minutes on the clock, they had their first sight of goal.
Jamie Paterson flew past Philippe Brinquin like a greyhound on the left, but his cross was headed wide by Derek Lilley when it seemed easier to score.
Approaching the 20th minute with little action to cheer the fans, Livingston had two chances in quick succession. Firstly, Lee Makel's free-kick at the edge of the box was well blocked, followed two minutes later by Chris McMenamin's angled shot which Gallacher saved well.
The goalkeeper spared the blushes of Gary Bollan after the ball had sailed over his head.
United, with Charlie Miller in for the injured Russell Latapy, looked out of sorts in the middle of the park although as the half progressed, they gradually took a grip of the game.
Ex-United favourite Alan Main foiled Jamie McCunnie in the 26th minute with a superb one-handed save after the youngster had woven himself into a good position in the box.
Then the Tangerines then carved out a great chance in the 40th minute when Miller nudged the ball into the path of Lilley. Unfortunately with only Main to beat he became disorientated.
Billy Dodds was introduced for the second period to revitalise the home attack with United reorganising to a more positive formation.
However, it seemed to have the opposite effect as United lost all sense of purpose resorting to Livinston's tactics of long-ball football as the Lions stole the game in the 88th minute.
Amazingly, Marvin Andrews was allowed to run 70 yards past six United players and slip the ball past a sluggish Gallacher.