Nacho Novo came off the bench to give Rangers all three points and thwart a determined effort from St Mirren.
Nacho Novo has scored in two games in a row for Rangers
John Sutton had headed the Buddies into the lead from a Simon Lappin cross.
But a thumping Charlie Adam free-kick restored parity against his former club and Thomas Buffel drove home the second from the edge of the box.
Sutton appeared to have dealt a blow to Rangers' title hopes by equalising from the penalty spot before Novo bundled the winner home from five yards.
Novo had dropped out of the starting line-up along with Karl Svensson following the midweek Uefa Cup win, making way for Dado Prso and Sasa Papac.
But it was the unchanged St Mirren side that made a lightning start to the game, going ahead after only five minutes.
Lappin raced down the left flank before sending a teasing cross into the box that was bulleted into the net off the head of Sutton.
Rangers looked under pressure and, when the move was replicated soon afterwards, only a desperate block by Julien Rodriguez prevented Richard Brittain getting a shot on target.
But it was Adam, who was on loan at St Mirren Park last season, who levelled the scoreline after 17 minutes.
John Sutton had given St Mirren an ideal start
Andy Millen was penalised for a challenge on Prso at the edge of the box and Adam sent a powerful, curling effort into the far corner of the net.
Rangers went ahead eight minutes later when Buffel gathered from Kris Boyd and left his marker for dead before driving the ball past goalkeeper Tony Bullock and into the same corner.
The visitors took control for the remainder of the first half but St Mirren applied early pressure after the break as Rangers found it difficult to cope with high balls into the box.
However, it was Rangers who forced the first save of the half when a blistering free-kick appeared to deceive Bullock before the goalkeeper cleared off the line with his legs.
Play was moving from end to end, with Sutton directing a header straight at Lionel Letizi and Prso forcing Bullock to save a low drive at the second attempt.
Rangers appeared to content to sit on their lead until St Mirren looked to have secured a deserved draw when Rodriguez was penalised for a challenge on Mark Corcoran.
Sutton squeezed the penalty kick under Letizi.
But Novo, back in favour after scoring against Livorno, grabbed the winner after Bullock could only parry another powerful effort from Adam.
St Mirren: Bullock, van Zanten, McGowne (Corcoran 70), Millen, Broadfoot, Murray (Kean 86), Lappin, Brady, Brittain, Sutton, Mehmet (McKenna 70).
Subs Not Used: Smith, Reid, Molloy, Mackay. Booked: Brittain.
Goals: Sutton 5, 78 pen.
Rangers: Letizi, Hutton, Papac, Rodriguez, Smith, Hemdani, Ferguson, Adam, Buffel, Kris Boyd (Sebo 88), Prso (Novo 78).
Subs Not Used: McGregor, Rae, Svensson, Ponroy, N'Diaye.
Goals: Adam 18, Buffel 26, Novo 85.
Ref: C Murray