The striker ran on to a header by Jame McPake to clip the ball past keeper Scott Brown from 15 yards and send luckless Dons out of the Cup on Saturday.
Thomas Konrad had earlier netted at both ends of the park during the opening 20 minutes but the hero of the day for the Dark Blues was keeper Scott Bain, who pulled off a series of excellent saves to deny the visitors.
The hosts had needed just four minutes to open the scoring when a Gary Harkins free-kick was met by Konrad, who netted with a close-range header although Brown did manage to get his left hand to the ball.
Shortly afterwards, Dons defender Mark Reynolds made a vital clearance to deny Dundee a likely second goal.
However, the visitors soon responded. First, Adam Rooney’s low shot was easily collected by Bain before Aberdeen levelled matters in the 17th minute when Niall McGinn’s low cross was deflected into his own net by Konrad at the near post.
In an exciting end-to-end contest between two teams in the top half of the Scottish Premiership table, an unmarked Greg Stewart fired over from 18 yards and, at the other end, Bain did well to push away a Rooney header on 38.
And the action continued after the break, although there were fewer chances created during the early stages.
On the hour, Bain made a brace of impressive saves, first blocking a 20-yarder by Ryan Jack and – from the resulting corner – holding on to a close-range header from David Goodwillie.
As the visitors continued to press, Rooney hit the side-netting after good work by Jonny Hayes who himself went close a couple of minutes later.
Two minutes from time, Bain saved brilliantly from Hayes and, shortly afterwards, Clarkson was quickest to react to McPake’s flick to crash the ball into the bottom left-hand corner of the net.
Yet there was still more to come as Aberdeen came mighty close to snatching an equaliser during injury time.
With almost 93 minutes on the clock, Ginn’s rising shot from close range was pushed against the bar by Bain, with the ball bouncing down on to the goalline before being cleared.
And Dundee breathed again to become the first team through to the fifth round.