Livingston’s Championship survival will be decided in the play-offs after defeat saw David Hopkin’s side lose touch with eight-placed Dumbarton.
Despite riding their luck to lead at half-time, the visitors suffered in the face of a spirited second-half comeback from the Doonhamers – who drew level from the spot before securing the points.
The Livingston manager blasted his players and the referee, Mat Northcroft, saying: “It was always going to be tough here, but every week it seems we give away a set play and a penalty.
“But that decision was unbelievable, frightening.”
Queens had all the early pressure and veteran strikers Derek Lyle and Iain Russell both squandered clear-cut chances before the latter was denied by the post.
It was on-loan Sam Stanton who broke the deadlock at the other end as he pounced six yards out after Jordan White had squeezed the ball through the home defence.
The fightback from Queens started on the hour mark, when Lyle drilled home a penalty after Morgan Neill had bundled Russell over.
Nine minutes later he made it two, with a bullet header from a corner. Gary Oliver wrapped up the points ten minutes from the end when Livingston failed to clear a Dale Hilson drive which rattled the crossbar.
In the closing minutes home sub Lewis Kidd received his marching orders for dissent.
Queens’ caretaker boss Gavin Skelton was delighted with the win but guarded about whether he wants the job full-time. He said: “I’ve hardly had the chance to speak to the board. My contract is up in a few weeks like many of the players and I know there will be some good applicants for the job so it would be unfair to comment.”