In a dramatic match, St Johnstone's hopes of catching leaders St Mirren were well and truly dumped even before the final score filtered through from Love Street.
Saints had been shattered by an early decision which saw Queens break the deadlock after 18 minutes from a disputed penalty as Graham Weir was bundled down in the box and John O'Neill converted.
Referee Ian Frickleton had waved play on, but Queens players brought his attention to the assistant standing with his flag up, and after a brief consultation the referee pointed to the spot.
It resulted in first Goran Stanic being booked for protesting and two minutes later Martin Hardie was shown a straight red card for a tackle on Gary Wood.
With Saints in disarray, Queens went further ahead after 29 minutes when Weir slammed home an angular drive.
But 10-man Saints were far from down and out and hit back in the 37th minute when Kevin James slotted home a cross from Jason Scotland.
Four minutes before the interval they were back on level terms when a clearance broke badly for Queens and Paul Sheerin drove home from close range.
The drama continued in the second half with Queens regaining the lead after 75 minutes as a harmless-looking cross was headed back by James only to see Matt Glennon off his line and, despite making a desperate backward leap, he was unable to stop the ball trundling into the net.
Saints' manager Owen Coyle was disappointed at the defeat and the booking of seven of his players including himself in addition to the sending-off, but said: "It was all down to frustration from that penalty award.
"But I have only praise for the way the lads fought back to level terms only to lose an unfortunate goal."
Queens' manager Ian McCall was delighted with the victory which lifts them four points above rivals Stranraer in the fight to avoid a relegation play-off spot.
But he said: "It's still far from over - there are still two games to go and that's six points and we'll be fighting all the way for them."