The Light Blues were under pressure to prove Wednesday's shock Betfred Cup exit at St Mirren was a mere blip after seeing their 27-game unbeaten run smashed.
But Rangers fans could be forgiven for fearing their team's bottle was teetering once again after Callum Lang fired the Steelmen ahead early.
However, Rangers dug in and showed their strength of character as first Roofe levelled before Cedric Itten's fourth goal of the campaign with just nine minutes remaining put them ahead.
And Gerrard punched the air with delight as Roofe struck again in stoppage time to seal a win which ensured Rangers stretched their lead over Celtic – who have three games in hand – and Hibernian.
It was cruel for Well who put so much into their defensive effort but they at least cling on to fifth place.
Gerrard responded to Wednesday's shock defeat in Paisley by recalling five of his big guns, with Borna Barisic, Steven Davis, Glen Kamara and Jermain Defoe back to start while Filip Helander returned after six weeks out injured for the concussed Leon Balogun.
Well were also looking to bounce back after defeat to the Buddies last week. Stephen Robinson did name two strikers with Lang and Tony Watt supposed to be starting up top but to all intents and purposes, Well shaped up with a Craig Levein-esque 5-5-0 as the frontmen dropped in to cover the wider areas anytime they were without the ball.
That happened to be most of the first half as Rangers dominated the ball, yet the front pair's gruelling shift down the flanks was made all the more bearable as the Steelmen had a lead to protect.
Rangers had threatened first when Jordan Archer parried away a Defoe effort but it was Well who pounced in the sixth minute.
The hosts failed to deal with a Well throw in, and with James Tavernier sleeping at the back post, Stephen O'Donnell returned the ball with a deadly low cross for Lang to tap home.
It was the first domestic goal Rangers had conceded at home since March and Gerrard must have wondered if he was about to witness another repeat of the mid-season collapse which has wrecked his title dreams over the past two seasons.
The initial response was hardly emphatic. Tavernier, Defoe and Ryan Kent came close but Well were happy to defend deep – while Tavernier missed a golden chance to level when Barisic picked him out at the back post.
There was still 10 minutes left of the first half but already the signs were showing that Rangers' nerves were fraying, with Kent even too busy complaining to referee Don Robertson about Allan Campbell's physical approach when he missed a team-mate's pass.
With his side trailing Scottish opposition at half-time for the first time since February's draw with St Johnstone in Perth, Gerrard decided a change was required at the break as he swapped Joe Aribo for Kamara.
The former Charlton playmaker fashioned the first real chance of the second half but Roofe was denied by Declan Gallagher's last-ditch block, while Davis thought he had equalised only to be flagged for offside.
Motherwell were defending heroically, throwing themselves at everything as Rangers were left trying to thread through the eye of a needle.
But the visitors' resolve was finally broken with 17 minutes left. Archer's poor clearance put his team in trouble and Rangers were quick to exploit as Tavernier whipped a high ball to the back post. Kent's first attempt at a cut-back was blocked by Bevis Mugabi but the winger got his toe on the ball again to tee up Roofe, who rammed into the net.
The former Leeds striker thought he had put his team ahead moments later as he glanced agonisingly wide from Barisic's cross.
But it was Itten – who replaced Defoe in the 70th minute – who headed his side ahead with nine minutes left after Ianis Hagi had flicked a Tavernier cross to the back post.
Well were finally forced to abandon their ultra-defensive shape but that only opened up more space for Rangers and Roofe made the most of it as he hooked his 10th of the season past Archer from Aribo's cross.