After a bright start from the hosts, two goals from United put them on the back foot before Steven Smith got them back into the game shortly before the break.
Rangers started well and almost had the ball in the net within a few minutes, but Bilel Mohsni's scuffed effort was somehow scrambled away.
Rangers were eventually made to pay for their wasted chances on 23 minutes. A couple of poor clearances allowed the ball to be headed through for Stuart Armstrong, who fired in off the post with the Rangers defence sleeping.
Rangers then hit the bar with a fortunate cross before the visitors did get a second to stun the home crowd. Gauld beat three players on the left before crossing to Armstrong, who helped the ball on to Gary Mackay-Steven whose deflected effort looped over the goalkeeper and in.
The home side managed to get themselves back in the game just before half time as Smith curled a free kick into the bottom corner.
There was still time for a penalty shout for United as Ciftci was brought down by a combination of goalkeeper and defender but the referee waved play on before blowing the half-time whistle.