Rangers kept in Celtic's slipstream - but only just - after Connor Goldson's late strike gave the disjointed Ibrox men a 2-1 win over Dundee at the Kilmac stadium.
Christie Elliott stunned the visitors when he headed the cinch Premiership's bottom side into the lead in the sixth minute, and the nervy champions failed to take advantage of a controversial penalty just before the break when captain James Tavernier hammered his spot-kick over the bar.
Aaron Ramsey levelled in the 65th minute with his first Rangers goal since signing on loan from Juventus in January, and with only four minutes of normal time remaining, defender Goldson forced in the dramatic winner to Light Blues' relief.
With seven fixtures remaining, Rangers moved three points behind Celtic as domestic football stops for the international break before resuming with a crunch Old Firm game at Ibrox.
Dundee remain four points behind St Johnstone but Mark McGhee, in the dugout for the first time after beginning his tenure as boss with an outstanding six-game touchline ban, can take encouragement from the performance.
Amid a gruelling fixture list which includes progression into the Europa League quarter-finals where they face Braga, Giovanni van Bronckhorst freshened his side up.
Ramsey made first league start for Rangers as fellow midfielders Scott Arfield and James Sands and defender Filip Helander returned.
McGhee brought back goalkeeper Ian Lawlor, Shaun Byrne, Declan McDaid, Elliott and on-loan Partick Thistle striker Zak Rudden and his changes worked a treat in the first half.
A launch of streamers from the Gers supporters meant an early stoppage in the game but when it resumed Rangers, in a new 150th anniversary white kit, were soon in state of shock when Jordan Marshall's cross from the left was headed in at the back post by Christie who outjumped Ryan Kent.
Rangers supporters then bombarded the pitch with tennis balls and referee Bobby Madden again stopped play to have them cleared, with the chants from the away fans suggesting it was a protest against the friendly match against Celtic in Australia in November.
On the bumpy pitch, Rangers were all over the place and took time to pose any sort of threat.
In the 15th minute Alfredo Morelos headed a Calvin Bassey cross past the post before Goldson fired a shot wide of the target.
The Ibrox side had the chance to level from the spot when captain Jordan McGhee challenged Morelos inside the six-yard box - it looked soft - but in keeping with Rangers' inept display, Tavernier blazed the ball over the bar.
Joe Aribo and Fashion Sakala replaced Helander and Arfield for the start of the second half and within seconds there was a third stoppage as more streamers came on from the away end, to further boos from the Dundee fans.
Lawlor made saves from Morelos, Ramsey and Aribo as the visitors at last began to put the home defence under pressure.
Kemar Roofe replaced Sands and was immediately involved in Rangers' equaliser.
Tavernier's cross from the left was headed towards goal by the Gers substitute and although Lawlor got a hand to the ball it fell to Ramsey to chest it over the line.
Remarkably, there was a fourth stoppage when the pitch sprinklers came on, albeit lasting only seconds.
The Light Blues kept up the pressure in the closing stages and eventually got the winner when Roofe's shot was blocked and spun up into the air with Goldson waiting to finish it off from close range, and seven minutes of added time came and went before the final whistle confirmed three crucial points for Rangers.