Gary Harkins put Dundee ahead from a penalty before Craig Slater levelled with a free-kick seven minutes later.
Referee Steven McLean awarded Dundee a spot-kick when he adjudged Mark Connolly had tripped Harkins, and the former Kilmarnock forward placed his effort into the bottom-left corner after 17 minutes.
The lead did not last long though and when James McPake made a rash challenge on Temitope Obadeyi, Slater stepped up and curled his free-kick from 20 yards into the corner of the net.
Killie had been denied an early goal when Kyle Letheren got across to turn a Josh Magennis header round the near post after Rory McKenzie had crossed.
And the visitors also responded positively to falling behind as McKenzie sent a shot narrowly wide after he was set up by Magennis.
Two minutes later Ross Barbour split the Dundee defence with a weighted pass and Obadeyi smacked the ball off the underside of the bar on 22 minutes.
Dundee started the second half brightly and Paul McGowan tested his former St Mirren team-mate Craig Samson with a free-kick, which the Kille keeper tipped past for a corner.
And two minutes later Harkins picked out Luke Tankulic at the back post but his glancing header dropped wide of the post.
The home team came close again when Samson kept out a toe-poke from McGowan from inside the penalty area.
Dundee substitute Jim McAlister almost scored a late winner but the unsighted Samson got across to make a fine one-handed save.
And Samson then denied the lively Harkins moments later as the Dark Blues pinned Kilmarnock in their own half.
Killie survived a bigger scare with the final action of the match when another Dundee substitute, Peter MacDonald, beat Samson with a well struck free-kick which came off the post.