This was a must-win game for Alex McLeish's side, and Gers fans would have been encouraged by their team's start.
Mikel Arteta clipped the top of Tepi Moilanen's bar as early as the third minute, but it was to be Rangers only serious attempt on goal in the first half, with Hearts having the better of the chances.
Steven Boyack and Robbie Neilson both fired efforts wide of Klos' goal before Mark De Vries had the best chance of the first half on 42 minutes.
The Dutchman bundled through challenges from Craig Moore and Lorenzo Amoruso and his left foot shot was goal-bound only for Klos to brilliantly tip the ball round the post.
Peter Lovenkrands replaced Arteta at half time as McLeish showed his intent to win the game, and Rangers took control of the second half.
De Vries was adjudged to have handled a Barry Ferguson corner on 63 minutes, and the referee Hugh Dallas pointed to the spot. Shota Arveladze stepped up for the spot kick but Moilanen pulled off a stunning save low to his left.
That save only delayed the inevitable, and Rangers took the lead two minutes later. Stephen Hughes dispossessed Jean-Louis Valois and broke forward. He fed Arveladze and Ronald De Boer headed home his cross from point-blank range.
De Boer turned from scorer to provider for Rangers second goal, beating the offside trap then squaring to Lovenkrands who slipped the ball under Moilanen from ten yards.
The result moves Rangers top of the SPL by the virtue of having scored one more goal than rivals Celtic, with the teams tied on points and goal difference with one game remaining.