The Meggetland side had run the show for most of the half, but had only a try from full back Keith Buchan, converted by stand-off Graeme Blackhall, who also kicked an early penalty to show for their efforts.
Inspired substitutions by home coach Ian Rankin transformed Dundee at half-time who went on to dominate the second period of the game. Andy Linton and Danny Levison came into the back five of the pack, resulting in the Mayfield side overturning a ten point deficit.
Levison was particularly effective with two outstanding tries.
Other scorers in the second-half fight back were flanker Andy Redmayne and scrum half Andy Dymock. Full-back Jamie Urquhart kicked three conversions and a penalty, while winger Stewart Walker kicked one conversion.
“We had to do something at the break, putting on some hungry players did the trick,” said a delighted Rankin after his side bounced back into the title race.
Muir were seriously handicapped by injuries up front, but can take solace from a fine first half.