But despite having plenty of chances to extend their lead, a combination of poor finishing and fine goalkeeping from away player John Gibson kept the Gable Endies in the game.
The visitors spurned two good opportunities in the last few minutes to equalise and it seemed they were on for an eighth defeat in as many meetings with Gers.
But Gray’s ferocious shot seconds from the end of regulation time smashed in off the underside of the crossbar to give the Angus club a result they’ll always remember.
This match was much like the 1-1 draw with Elgin three weeks ago for the way it panned out and ended with a whimper for the Govan side.
The scoreline means they’ve actually extended their advantage in the Third Division to 20 points with the rest of the league not playing because of bad weather.
In truth, they are so far ahead of the chasing pack that even if Queen’s Park’s games in hand are won and that gap is cut to 11 points, it probably won’t be clawed back completely.
Nevertheless, manager Ally McCoist will be concerned at the way his team is struggling to break down teams then see them off whenever they get into winning positions.
Rangers made just one change to the side which beat Peterhead 1-0 at Balmoor six days ago, with Dean Shiels and Ian Black swapping starting and substitute roles.
The Gable Endies struck first when the teams last met last month and they nearly did the same again early on, with Neil Alexander getting down well to smother a long-range drive.
At the other end, Fran Sandaza nearly connected with a low cross from stand-in captain Lee Wallace but he was just beaten to the ball by keeper Gibson.
Gibson had already conceded 14 goals to Gers in three games this season whilst on loan to Elgin from Dundee.
But he was alert as he looked to stop that tally rising in the opening exchanges, with the hosts pushing forward enough but without really troubling the Links Park number one.
Although the Light Blues were enjoying plenty of possession, Montrose were effective at breaking the home back line when they poured forward and caused a couple of scares.
That heightened the need for McCoist’s men to get an opener and Sandaza nearly set up one for Shiels but his effort his tame and held by Gibson.
Templeton’s low curler almost crept in instead with the keeper’s sight blocked by one of his own defenders but he recovered and held it at the second attempt.
Frustration at failing to forge ahead in the first third of the game was compounded as that period of play came to a close with the loss of young midfielder Lewis Macleod.
Although the teenager was having one of his quieter matches, he has been a key figure in driving Rangers forward for much of this season.
That meant that when he went down holding his knee in clear difficulty after an innocuous collision with full-back Paul Watson, a distinct hush quickly fell over Ibrox.
The exact damage suffered by Macleod has yet to be determined but as he was carried off and replaced by Black, it didn’t look good for him.
Templeton tried to rally his side once play got going again, having one shot blocked and putting another header over the crossbar when it seemed easier to score.
Black also pulled a rising effort too high after good chasing down the line by Sandaza to reach a pass he seemed to have given up on at one stage.
With half-time approaching, Gers tried to lift things for the sake of going into the interval with an advantage.
And after Sandaza lifted over the woodwork, they finally went in front in fortunate circumstances.
Templeton’s ball into the box may well have been meant as a shot but it looked more like a cross as it flew into a ruck of bodies.
The trouble for Gibson is he was unsighted once more and it flew past everyone with a touch off defender Crawford’s knee, flashing into the net before the keeper could react.
Rangers set about trying to build on their goal after the restart and Little fired a yard too high with a crisp attempt.
What followed was quite poignant as home fans respectfully observed a piper’s lament for supporter Robert Learmonth, who died at Ibrox during the recent game with Berwick.
As fans on all four sides of the ground stood silent in the 54th minute in memory of the 57-year-old, the game carried on with the shouts of players on both sides clearly audible.
Soon a chance materialised and had Shiels scored, it would have been a perfect tribute to the season ticket holder but sadly Gibson stood up well and saved.
With Montrose just a goal behind, they were keen to serve notice they were still in the game and Martin Boyle missed a good chance at the back post.
Ross Perry then had to slide superbly to deny the striker again moments later as he shot when he should perhaps have been less selfish and passed to a better-placed team-mate.
Gers lifted things as they looked to close the contest out, with Shiels bending just over and Black steering well wide.
When they did get the ball on target, they found Gibson in terrific form – and when they beat him, Black was unlucky to see his free kick crash off the post.
With time running out, the game was on a real knife edge and play was beginning to roar from end to end.
But it was Montrose who pressed more and Garry Wood should have done better after good link-up play with substitute Scott Morton than fire over the bar.
Jamie Winter then followed up with a furious free kick which Alexander did well to get down and smother.
It seemed those misses would mean the league’s third-placed club would fall just short but with injury time approaching, Gray’s screamer made it 1-1.
The goal was deserved and although it finally brought Rangers back to life, it was too little too late.
Black’s shot in the final seconds was their best effort but as it hit the post and rolled away, it meant dropped points at home for the second time already in 2013.
RANGERS: Alexander; Hegarty (Faure 61), Perry, Cribari, Wallace; Little, Hutton, Macleod (Black 28), Templeton; Shiels (McKay 74); Sandaza.
SUBS: Gallacher, Crawford.
SCORER: John Crawford OG 45.
MONTROSE: Gibson, Masson, Watson, Crawford, Campbell, Winter, Boyle, R McIntosh, L McIntosh (Gray 64), G Wood, Johnston (Morton 83).
SUBS: S Wood, McLeish, Lunan.
SCORER: Gray 90.
BOOKED: Masson.
REFEREE: Craig Charleston.
ATTENDANCE: 46,273.
{module ADD THIS: Article Embed}