Mitch Megginso scored a wonderful late equaliser but Ciftci soon hit an 89th-minute winner.
United, wearing Arsenal-style away strips, named a strong team and lined up in a 3-4-1-2 formation with Gauld tasked with providing Brian Graham and David Goodwillie ahead of him.
United created numerous chances in the opening 15 minutes and Goodwillie should have opened the scoring but sent a free header wide from Mark Wilson's cross.
Graham had a hopeful handball appeal rejected when he lashed the ball into Aaron Barry from close range and then saw his volley well saved by Jamie Ewings following Andrew Robertson's cross.
Robertson sliced wide after being set up by Gauld and, after Bryan Prunty had glanced a header wide at the other end, Graham then headed straight at Ewings.
United could not maintain their early pressure but they looked to be in little danger themselves until the 33rd minute.
Dumbarton right-back Paul McGinn sent a ball into Smith from the halfway line and the forward turned John Souttar and shot past the onrushing Radoslaw Cierzniak with the United defender only helping the ball into the net as he tried to atone for his error.
United almost levelled instantly when Gauld hit a swerving 30-yard effort that bounced off the bar.
Graham missed a late first-half chance and United hit the frame of the goal again 10 minutes after the break when Paul Paton ran into the box and saw his shot delect off Barry and hit the post.
Barry nearly scored at the other end but Robertson blocked his volley in the goalmouth just before Jackie McNamara moved to a 4-4-2 when Ciftci replaced Wilson in the 63rd minute.
The change paid off six minutes later. Ciftci chested the ball inside Scott Smith after the Sons left-back misjudged Paton's diagonal ball and the winger volleyed home inside the near post.
Ciftci moved up front when Chris Erskine replaced Goodwillie and he set up the second moments later when he used his pace and strength to get round Barry and make the bye-line before cutting it across goal.
Gauld's first effort was blocked but he had time to take a touch before rifling the rebound into the net from close range.
United sat back and Megginson made them pay with four minutes left of normal time.
There appeared little danger when the former Aberdeen forward collected the ball just inside the left edge of the box but he curled into the far top corner.
The parity lasted just two minutes as both United subs combined to win the tie. Erskine cut inside from the right wing and played a reverse pass to Ciftci, who fired home from 10 yards.
- Sports & Recreation
- Brian Graham
- Ryan Gauld
- David Goodwillie
- Kevin Smith