Stuart McCall’s side were looking to confirm their place in the promotion play-offs after his first month in charge saw the team pick up two draws and three successive victories.
But that resurgence ended when Derek Lyle and Gavin Reilly scored either side of an own goal from stand-in captain Lee Wallace just 16 seconds into the second half.
The home side took the lead against the run of play just after the half-hour mark when Lewis Kidd’s cross found Derek Lyle who half-volleyed the ball into the far corner for his 13th goal of the season.
Kenny Miller headed against the bar minutes later after Andy Dowie failed to clear Haris Vuckic’s corner as Rangers drove forward in search of an equaliser.
Wallace was convinced he was due a penalty just before the break after tangling with Mark Durnan but referee Don Robertson waved his claims away.
And Wallace’s night went from bad to worse just moments into the second half as he put through his own net.
Queens drove straight at the Gers defence from the kick-off as Gavin Reilly swept a low ball across goal from the left.
It found Kidd racing in at the back post but while his shot was creeping wide Wallace could not sort his feet and watched in horror as the ball clipped his heel and trickled over the line.
The hosts were three ahead after 69 minutes when Robbie Crawford conceded possession deep inside his own half and Kevin Holt exchanged passes with Reilly, who finished calmly past Lee Robinson.
Zander Clark saved well from Vuckic while sub Kris Boyd headed wide in the final stages but Rangers were unable to force a goal.
The result moves Queens above Falkirk in the race for the fourth and final play-off slot.