The Arabs have been in good form of late and although they did not command victory over third-placed Hearts, they got there eventually.
Johnny Russell did the damage with the opening goal seven minutes from regular time when he headed home a cross from substitute Danny Swanson before making it 2-0 in injury time with a finish from close range after Swanson had flicked on Paul Dixon's cross.
The win put Dundee within 12 points of third place but manager Peter Houston did not have that position in mind just yet.
"I am not even thinking about catching Hearts," Houston said. "I can't even tell you how many points Hearts are above us but I don't think they can be caught because they are a good team and they'll win a few games between now and the end of the season.
"I have full admiration for Jim and Billy (Brown, Hearts assistant manager) and they've got a really good squad of players. Hearts are a right good side and deservedly up there, I don't know if they'll split the Old Firm but they have been the best of the rest this season, I have no issues with that.
"I am just happy to win and take one game at a time. Last year we did it by not looking too far forward. I am more than happy with what we've got from the game and we'll take it from there."