Gardyne crashed the ball high into the net from eight yards after Jon Daly had nodded the ball across the face of goal from Stuart Armstrong's deep delivery into the penalty area.
United were on the front foot from the start of the match on a dreich afternoon and Davide Grassi deflected a Daly flick past the post after Barry Douglas had swept the ball in from the left flank.
Rory Boulding and Armstrong both put shots wide of the same post before Dundee were reduced to 10 men when Gary Irvine clattered into Richie Ryan during an aerial challenge.
From another Douglas delivery Gary Mackay-Steven sent his diving header off the crossbar with Steve Simonsen getting his fingertips on the ball and the keeper got down at the feet of the United winger to block another effort shortly after that.
Mark Miller was next to try his luck with a shot from 20 yards which again whizzed past the right post, and just before the break Gary Harkins muscled his way through the United defence and sent a low drive narrowly wide as Dundee finally had an attempt at goal.
Daly had the ball in the Dundee net five minutes after the interval and was harshly ruled offside shortly before Brian McLean headed over from a similar distance.
But the visitors struck on a rare attack after 67 minutes when Brian Easton found Ryan Conroy in the box with a cross from the left and the Dundee forward took a touch into space and rifled the ball into the roof of the net.
Simonsen protected Dundee's lead with a brilliant diving save to keep out Daly's shot from 10 yards, with the big United striker clipping the rebound over the bar, and Gardyne almost struck again seconds from the end with a low drive that shaved the post.