Bottom of the table Rovers dominated the game for long periods and created a number of scoring opportunities but, largely due to the efficiency of the highly experienced Colin Scott in the Queens goal, they were unable to find the net and paid the penalty in the closing stages when the vistors' Derek Lyle took advantage of a defensive blunder to give his team all three points
The home side began the game brightly, with defender Paul McMullan pushing forward in the fifth minute and testing Scott with a firmly struck drive from 25 yards.
Queens responded with a curling effort from Brian McColligan which flew narrowly wide.
But for most of the first half Raith remained on top and the scores remained level at the interval thanks only to a brilliant double save from Scott to deny both Craig O'Reilly and John Martin.
The second half followed a similar pattern with the Kirkcaldy side controlling the game but failing to find the killer touch in front of goal.
Their best chance occurred 11 minutes after the break when Iain Davidson glanced a header wide from close range following a free-kick from Paul McMullan.
Raith gifted Queens the points four minutes from time when Davidson's poorly hit pass-back was intercepted by Alex Williams who set up Lyle with a simple chance to steer the ball into the unguarded net.