Rangers extended their lead at the top of the table to three points as they headed into the winter break but it was a hard-earned victory for the Ibrox side.
Indeed it took a brilliant save by Stefan Klos midway through the second half to prevent Dundee equalising for a second time.
As it was, it was not until new signing Steven Thompson netted their third goal eight minutes from time that Rangers could afford to relax.
The home side pushed forward from the start but Peter Lovenkrands was too slow in crossing and lost the ball.
Rangers nearly went ahead in the 18th minute when Michael Mols dispossessed Zurab Khizanishvili but from his pass Ronald de Boer's shot was blocked by keeper Julian Speroni's legs.
Rangers took the lead shortly after with a swift counter-attack. Claudio Caniggia's pass found de Boer and Barry Ferguson brilliantly controlled his pass before surging into the box and shooting high past Speroni.
However, RangersÂ’ lead was short-lived. Fabian CaballeroÂ’s shot was deflected to Steve Lovell who was unmarked at the back post and he guided his shot into the far corner of the net.
Mols then outpaced Barry Smith to latch on to another superb de Boer pass but could only find the side-netting with his shot.
Rangers wasted a great chance to restore their lead when Speroni's clearance spun off Lovenkrands to de Boer, but the Dutch striker missed the open goal with his first-time shot.
De Boer made amends shortly before half time when he put Rangers ahead with a 20-yard shot after good build-up play by Mols and Lovenkrands.
Speroni again made two good saves early in the second half from Lovenkrands.
Substitute Thompson played Lovenkrands clear through on goal but yet again Speroni denied him with a great block.
Then came Klos' excellent save from Lovell as the midfield player held off Lorenzo Amoruso's tackle.
Thompson wrapped up the points with his debut goal which was a simple tap-in from de Boer's cross after the other substitute, Steven McLean, had set up the chance.