Keith Watson looked to have earned United the advantage in the first leg of the third qualifying round after he bundled home from close range - but Alexander Kokorin silenced the home crowd with a 25-yard strike that looped into the net off a United defender.
United had taken the lead against the run of play in the 37th minute when Willo Flood drove home from 16 yards and they created a series of chances before Igor Semshov headed the Russians level five minutes after the break.
United debutant Radoslaw Cierzniak produced a string of excellent saves but the home side kept coming back and Watson struck in the 75th minute.
United suffered narrow defeats to AEK Athens and Polish side Slask Wroclaw in their previous two campaigns and they have given themselves a fighting chance of going one better, although the second away goal leaves Dinamo favourites.
But Dinamo have already been knocked out of three competitions by Scottish sides - twice against Rangers, including the 1972 European Cup Winners' Cup final, and by Celtic in the Champions League qualifiers three years ago.
The visitors created a number of chances but they looked vulnerable at set-pieces and struggled to contain Gary Mackay-Steven.
United's performance was all the more impressive considering manager Peter Houston lost first-team regulars Dusan Pernis, Scott Robertson, Paul Dixon and Garry Kenneth in the summer - with Cierzniak the only debutant after several players shook off injury concerns.
The Russians started brightly and were looking bigger, stronger and slicker on the ball and United survived several scares involving striker Kevin Kuranyi.
The Germany international and Zvjezdan Misimovic got in each other's way after a cross caught out the home defence and the forward then miskicked and fell over after being played through.
Kuranyi produced a better effort from Marko Lomic's cross but headed just wide.
United had not threatened Anton Shunin before the goalkeeper was picking the ball out of his net.
John Rankin's shot deflected off a defender's heel and fell perfectly for the unmarked Flood, who drove the ball in off the far post.
The atmosphere and the home team were immediately transformed by the Irishman's goal as Moscow survived some real pressure.
Jon Daly shot's 20-yard shot was deflected wide for corner and the striker was inches away from meeting Barry Douglas' delivery.
A low cross from Douglas then fell for Johnny Russell but his powerful shot flashed just wide after coming off a charging defender.
Flood's cross then allowed Daly a free header at the back post but the striker could not meet it head on and his effort flashed well wide.
Dinamo almost pulled a goal back from the resulting goal-kick after Kuranyi's header found Kokorin but he lobbed over.
United had the first chance of the second half after a corner when Sean Dillon blazed over when a ball across the face of goal might have set up a team-mate.
But the visitors levelled after left-back Lomic made an untracked overlap.
The defender's cross cleared the goalmouth but the ball was chipped back in by Kokorin and Semshov stooped to head home from six yards after getting in front of Gavin Gunning's attempted clearance.
Cierzniak then kept United in it with a series of excellent saves. The Pole blocked Kuranyi's effort before a brilliant one-handed diving stop from the German's header.
Moments later he dived to his other side to push Misimovic's curling effort away from the top corner.
United responded with Mackay-Steven causing problems down the left but again Cierzniak rescued them as he blocked Kokorin's effort.
Both sides continued to attack. Rankin twice threatened from long range and Mackay-Steven's cross was almost palmed in by Shunin after the winger raced past former Middlesbrough full-back Luke Wilkshire.
Tannadice erupted when some persistence paid off following Mackay-Steven's corner.
Shunin saved Gunning's header and Watson converted from close range after Daly's effort was blocked.
United kept the pressure on before dropping back and looked to have survived after Kokorin's shot hit the outside of the post from a tight angle.
But the striker was celebrating two minutes into injury-time after a long ball fell for him 25 yards out. The front player's left-foot strike hit a United defender and looped over Cierzniak and into the top corner.