Mark O’Hara and Kevin Holt grabbed the goals as Dundee earned their first home league win over Rangers since 1992.
Henrik Ojamaa set up the opener, delivering from the left for O’Hara to finish from 10 yards.
Holt scored direct from a free-kick, the ball curling across the face of goal and beyond Wes Foderingham.
Joe Garner reduced the deficit after the break when he cracked a fine drive past Scott Bain from 20 yards, but that was as good as it got for Rangers.
The result sends Dundee into the top six and leaves Rangers six points adrift of second-place Aberdeen, who came from behind to beat Kilmarnock 2-1 at Rugby Park earlier on Sunday.
Dundee manager Paul Hartley said before this game that he wanted his side to press and work Rangers more than they had in both previous encounters this season – encounters their opponents won narrowly.
From the first shrill of referee Craig Thompson’s whistle, the men in dark blue did just that. They fought for every loose ball and battled to break up every attempt from the visitors to get the ball down and build up any momentum.
The defensive nervousness that has plagued Rangers for much of the season was also on show and after just 13 seconds, Craig Wighton stormed down the right and crossed to O’Hara who headed just wide.
It was a warning that went unheeded and 10 minutes later the visitors were punished. Hartley’s men found space on the left and when Ojamaa cut the ball back, the unmarked O’Hara fired a left-foot shot low past Foderingham.
Rangers were undone by a set piece for the second. Defender Holt stepped up to take a free-kick just outside the Rangers box and when he let fly with his left foot it curled low through the Rangers wall and sneaked past Foderingham, who got a touch but could not keep it out.
It was no more than the home side deserved and Rangers looked very much on the ropes before the bell had even gone for the break.
The second half started in similar fashion as the first had ended but Rangers eventually gained a foothold and capitalised on Dundee’s first slack period of the day.
Garner picked the ball up midway inside the Dundee half and as the defence backed off, he switched to his right foot and unleashed an unstoppable shot into the bottom right-hand corner from outside the box.
Suddenly there was noticeable belief in the visiting ranks but Dundee refused to buckle and their defence stood firm in the face of pressure.
As the clock ticked down, Rangers substitute Harry Forrester blasted high over the bar at the back post when he should have burst the back of the net.
At the other end, Wighton almost capped a fabulous performance with a goal but after excellent work, his shot was stopped by the outstretched leg of Foderingham.
Dundee manager Paul Hartley: “I’m really pleased for the players – the plan that we worked on all week, they carried it out properly today from the first whistle. We got after Rangers. Our intent was to put as much pressure on Rangers as possible and we managed to do that.
“The work-rate was incredible today, the fitness levels were terrific and that desire to keep running and put Rangers under pressure, we did that.
“We know what type of team they are, they try to build from the back. We sussed their system out, how they might go and we just didn’t let them build at all. We were always on the front foot.
“It shows that we can play like that, so from now until the end of the season we have to put those type of performances in every week, with that work-rate, desire and energy.
“We want to get as many points as we can before the split. We managed to get three today and I always felt we could get three today. But now next week is our focus. The players put so much into the game and it’s got to be like that in every single game now.”
Interim Rangers manager Graeme Murty told Sky Sports: “It was really disappointing, we didn’t implement the things we tried to do enough in the game and I think any team you give a two-goal head-start to is going to be very very difficult to catch up.
“We challenged them at half-time to show more and I think they did show more. But I said to them that you can’t wait until half-time, it’s got to be there from the get-go.
“The players understand what the demands of this football club are and they know they are there to be met. I know they can do it, it’s a matter of making sure they translate it into performances and not wait to be shocked into it.
“The appointment [of a new manager] will take place whenever it takes place. The players have to take care of business on the football pitch, first, last and always. I’ll carry on until I’m told otherwise but it’s fair to say I’m very, very disappointed with how this first game has gone.
“They’re disappointed, they’re shot to pieces but they have to pick themselves up because the demands of this football club are that we go again. We expect more from them and to be perfectly honest, I expect more from them than they showed today. They expect more from themselves, so they’re disappointed with themselves more than anything else.”