The striker made his first start since signing a lucrative new five-year deal and marked the occasion with the only goal of the game late on at Ibrox, after United had been frustrated by the Scottish champions for the majority of the game.
United and Valencia will now battle for top spot in Group C in the final game, while Rangers can take some consolation from parachuting into the Europa League ahead of Turkish champions Bursaspor.
United could have had a penalty in the first couple of minutes when Dimitar Berbatov went to ground in the box under pressure from Davis but no award was forthcoming from Swiss referee Massimo Busacca.
Rooney came agonisingly close for the visitors when he met Fabio's cross only to see his header bounce off the crossbar on the way over five minutes before the interval.
Rangers should have had the net bulging when Kenny Miller raced on to a Steven Naismith ball down the right flank and cut inside only to see his six-yard drive blocked at the near post by Edwin van der Sar.
United were out of the traps quickly after the restart and Rooney saw a free-kick from distance curl just past the post, before his close-range header was smothered by Allan McGregor.
But Rangers had a decent chance of their own when Jonny Evans, trying to shepherd the ball back to his keeper, let Naismith in, but Van der Sar was already off his line to make the save as the midfielder tried to poke the ball past him.
At the other end, McGregor was called into action again, this time to prevent a Berbatov shot from finding the back of the net.
The breakthrough finally came after 87 minutes when Fabio was fouled by Naismith in the box and the referee immediately pointed to the penalty spot. Rooney stepped up and lashed confidently into the bottom corner, leaving McGregor with no chance.