The England striker, making his first start since signing a new deal at Old Trafford last month, had a poor night overall at Ibrox and struggled to find his range.
But when Steven Naismith was penalised for a foul on Fabio four minutes from the end, the hitman made no mistake from 12 yards to send his side into the knockout stages.
The final 1-0 scoreline means United are likely to progress as winners of Group C – with Gers definitely into for the last 32 of the Europa League.
Valencia’s 6-1 destruction of Bursaspor at the Mestalla means Walter Smith’s men will finish third in the pool.
And although they almost did enough to hang on for a point here and cause another surprise against the Red Devils, the manager will settle for the final outcome.
Now the Scots will go to Turkey to complete their sectional fixtures next month, with more European football awaiting them in February.
As if they weren’t short of options already, Gers lost Kyle Lafferty from their squad after a freak accident earlier in the day.
That meant a European debut for young Kyle Hutton in central midfield as manager Smith reshuffled his pack yet again.
It was only his second start after his outing against Dunfermline in the League Cup in September and the 19-year-old joined Lee McCulloch in central midfield.
Steven Davis was deployed in an unfamiliar right wing-back role, with Steven Whittaker in an even more unusual central defensive role on the right side of a middle three.
Vladimir Weiss also came back into the team at John Fleck’s expense, with Richard Foster moving to left back in a 5-4-1 formation.
Perhaps deflated by having so many first-team stars unavailable, the crowd were fairly muted as play got underway and you sensed they were braced for a long night.
Indeed, it was to be expected that United would enjoy plenty of early possession and that was exactly what happened.
What was more of a surprise was that it took them almost seven minutes to create their first chance and when it came, they should really have done better.
Fabio did well to find space on the left flank and when he swung the ball in, Dimitar Berbatov headed goalwards but straight at the relieved Allan McGregor.
The Light Blues responded well and tried to make an opportunity of their own but when it seemed Kenny Miller might have sight of goal, the ball got caught under his feet.
With that, the noise slowly started rising – and it would have turned into one almighty crescendo had the next attack gone the way the hosts thought it might.
Naismith was fouled 35 yards out and when Davis lifted the set piece into the box, David Weir got on the end of it and flicked it wide to Miller.
He then nodded back across the face of Edwin van der Sar’s goal but with the keeper beaten, a relatively tame effort crept a yard wide.
It was inevitable a team of United’s quality would come back and both Nani and Rooney could have netted from six yards but neither could find the target.
Rangers weren’t helping themselves either, with Davis passing straight to Ryan Giggs when he had other options.
When Berbatov then helped the ball on to Rooney, late intervention from Kirk Broadfoot was required to take the striker’s shot away from the target rather than towards it.
Despite the fact they were getting a little closer, United’s front players were becoming frustrated too.
And with half an hour gone and the match still goalless, Smith would have been the happier of the two managers – even if his men hadn’t been a great attacking force.
The Premership outfit was also guilty of slack play and van der Sar was certainly playing a risky game with some of his clearances.
One in particular – a pass between Miller and Weiss which he’ll no doubt claim was deliberately pinpointed – very nearly presented an open goal for the latter to shoot at.
It was the Red Devils who came closest in the first half when Davis again lost possession as he tried to find Miller.
The result was another bolt down the left flank by Fabio and when he found the incoming Rooney, only the crossbar denied him when he rose above Broadfoot.
If that was the nearest anyone came, it was Miller who had the best opportunity before the break when he broke the offside trap after linking well with Naismith.
In on goal, he only had van der Sar to beat and although Foster was free near the back post, he chose to shoot with the outside of his boot.
It was a tight angle though and the keeper spread himself really well when it seemed Gers might take an unlikely lead.
Play restarted after the interval with the SPL champions already safe in the knowledge they were bound for post-Christmas continental football for the first time in three years.
With Valencia thrashing Bursaspor 4-0 in Spain at that point, third spot in the group and a Europa League place was all but confirmed.
Even so, hopes of a win over United were very much alive and the points which would come with that would keep Gers in with a chance of remaining in the Champions League.
Rooney had two chances to change the outlook moments into the second half but his free kick went wide and a weak header ran straight to McGregor.
Berbatov could also have broken the deadlock after Giggs got behind Whittaker but he got his timing all wrong and screwed a volley up into the air.
Hutton had been fairly quiet, keeping things simple without getting too involved, but he nearly introduced himself in stunning style.
Winning the ball in the centre circle, he played a neat one-two with Miller and burst forward, shooting hopefully when he had no other option but with no success.
United tried to lift things and Rooney showed his class with a wonderful reverse pass to Michael Carrick and McGregor had to save well from the midfielder.
In fairness to Rangers, they hit back when they could and a touch of hesitancy almost let in Naismith but van der Sar just kept him out and no more.
Play was starting to open up with the game beginning to find a bit of life at last after a turgid first 45 minutes.
Although it became more scrappy, that suited Gers to an extent and they were unsettling their opponents a touch.
With 20 minutes left, it was still anybody’s game and although you felt United had it in them to lift the tempo, they weren’t being allowed to by the stuffy hosts.
Ferguson’s men were making more openings with Berbatov missing twice then Rooney heading wide over the space of a few seconds.
The English side were first to make changes, with Anderson, Gabriel Obertan and Javier Hernandez all asked to go and freshen things up.
Weiss also made way for Fleck after his tricky feet and swagger had infuriated Giggs to the point that he might find himself paying for it soon enough.
With time ticking down, United looked content with a point that would see them through to the last 16 and needing to avoid defeat against Valencia to finish top of the pool.
But then a foul by Naismith on Fabio proved so costly, with referee Massimo Busacca playing the advantage rule at first then awarding a penalty when it came to nothing.
Up stepped Rooney and after a disappointing night by his standards, he improved it significantly as he stroked in the winner.
United just about deserved to sneak the three points in the end but Gers can take heart from the way they made their rivals work so hard for them.
Now it’s next stop Turkey then a drop into the secondary competition – and we all know how things went the last time that happened.