The two sides, level on 37 points apiece before kickoff, were on course to share the spoils until Aden Flint popped up in added time for his sixth goal of the campaign after the hosts hit the woodwork four times.
United had earlier battled back from a goal down through the division's top scorer in Leon Clarke, but they were unable to hold on after having John Fleck sent off on the hour and are now winless in four matches - their longest-such streak in 16 months.
A sixth away league win of the season for City is enough to move them within three points of Cardiff City, who occupy the second automatic promotion berth with a game in hand to play.
A penalty shout came and went for Nathan Baker soon after when pulled back as he guided a corner wide, while Duffy was then at it again up the other end as his curled free kick clipped the post.
The right-winger was seeing plenty of the ball in dangerous positions, forcing Fielding into another save after getting the better of Bailey Wright.
United found the frame of the goal for the second time before the interval, with Clarke laying the ball off for Sharp to hit the top of the bar wit his attempt, before Fielding produced a superb stop to keep the striker out from the next attacking move.
Having hit the woodwork three times in the opening 43 minutes, the hosts found themselves a goal down against the run of play when Jamie Paterson turned inside Jack O'Connell and lashed the ball past Moore.
The Blades' response was good, though, as in-form striker Clarke was given plenty of space to fire home early in the second half for his 14th goal of the season.
Brownhill and Marlon Pack both came close to scoring as United were made to hold on for their point, but they were unable to see out the remainder of the match as Flint once again proved to be City's hero.
Bobby Reid got a cross away despite being fouled, which Flint was on the end of at the back post after the advantage rule was played to good effect.
Sheffield United (3-5-2): Moore; O'Connell, Stearman, Basham (Carruthers 86'); Lundstram, Duffy (Brooks 77'), Stevens, Fleck, Baldock; Clarke, Sharp (Donaldson 81')
Bristol City (4-4-1-1): Fielding; Wright, Bryan, Flint, Baker; Eliasson (Djuric 46'), Pack (Leko 76'), Smith (Taylor 62'), Brownhill; Paterson; Reid