John O'Neil gave the Doonhammers the lead against the run of play in the 32nd minute, but after sustained pressure County drew level six minutes from the end when Martin Canning scrambled the ball over the goal-line.
But the game was marred by the dismissals of Gary Wood and Stephen Bowey.
Queens made a positive start, but it was County who created the first opening in the fourth minute. Alex Burke sent a long ball upfield and Steve McGarry cut it back for the in-rushing Fergus Tiernan, but his shot was tipped over the crossbar by Colin Scott.
County came close four minutes later when Maciej Nuckowski met a deep cross from Don Cowie, but his header was well saved by Scott.
However, for all the home side's chances it is was Queens who almost took the lead in the 31st minute when Stephen Payne forced a point-blank save from Stuart Garden.
But the Doonhammers did go in front 60 seconds later when an innocuous Willie Gibson cross from the left was headed into the net by John O'Neil from six yards.
County almost snatched an equaliser in first half injury time when Rankin was denied by a blocking save from Scott and Alex Burke fired the rebound into the side netting.
After the break a reverse pass from Martin Canning set up Cowie, but the County midfielder drove the ball past Scott's right-hand post.
The home side were pushing players forward in an effort to get on level terms, and a knockdown from substitute Kevin McKinlay presented Winters with a chance but he completely mis-cued in front of goal.
Queens were reduced to 10 men in the 73rd minute when Gary Wood pulled dow David Winters outside the area and referee Andrew Hunter showed him his second yellow card of the game.
In an amazing finish to the game, Martin Canning scrambled the ball into the net for the equaliser in the 84th minute following a Rankin corner.
Rankin was in a hurry to get the ball back to the centre line, and after a scuffle involving Brian McColligan and Stephen Bowey all three players got booked.