Viktor Gyokeres struck late on to secure all three points for City at Ashton Gate.
Ian Maatsen gave City the lead midway through the first half with his third goal of the season, but Bristol City drew level through Chris Martin in the second 45.
However, City continued to push for a winner and they were rewarded when Gustavo Hamer slid the ball in for Viktor Gyokeres, who calmly slotted the ball past Bentley.
Mark Robins’ men had the first real chance of the game from a Gustabo Hamer corner just six minutes in, the in-swinging corner beat everyone and landed just on top of Dan Bentley’s net, giving Bristol City an early scare.
The hosts had their first chance of the game on the quarrter of an hour mark, a free kick was whipped in from the corner of the area by Alex Scott, however Andreas Weimann couldn’t get his header on target.
Simon Moore was called into action just after, some good build up play saw Han-Noah Massengo in som space on the edge of the area, but Moore managed to keep his shot comfortably out.
City finally made the break thoguh 24 minutes in, a nice spell of posession saw Hamer float a through ball over the top of the Bristol City defence for Maatsen to latch on to and smash in the far corner past Bentley to make it 1-0.
The lead was nearly doubled shortly after, Viktor Gyokeres was played through on goal, but he dragged his effort past the hosts post.
HALF-TIME: BRISTOL CITY 0 - 1 SKY BLUES
The Robins came close to drawing level soon into the second half, a well delivered ball by Scott was met by the rising Antoine Semenyo, but his header crashed off the crossbar as the Sky Blues remained in the lead.
O’Hare came close to extending the visitors lead 55 minutes in, a slick ball by Gyokeres found O’Hare in space at the side of the area, and his mazy run saw him beat two Robins defenders, however his finish was kept out by Bentley.
Bristol City managed to find the equaliser in the 63rd minute, their well worked corner saw a ball delivered in to th efar post which was headed across goal by Weimann for Martin to head home past Moore to make it 1-1.
The Sky Blues started to apply more pressure in a bid to retake the lead, good link-up play on the edge of the area saw O’Hare tee-up Maatsen, but his half volley was well kept out by Bentley giving City a corner.
The resulting corner by Hamer was met by Dom Hyam at the back post, but his header crashed into the post leaving the scores level.
The visitors made a couple of changes as they looked to press the Robins more bringing on Jordan Shipley and Fankaty Dabo.
Moore produced a fine save with five minuted of normal time remaining, Martin was played through on goal, but Moore came out and produced a good save from Martin’s effort.
Then, the Sky Blues pushed forward at the other end and a superb counter-attack, orchestrated by Gustavo Hamer saw the Brazilian slide the ball through for Gyokeres and he scored his 13th goal of the season to give the Sky Blues the three points.
FULL-TIME: BRISTOL CITY 1-2 SKY BLUES
Referee: Dean Whitestone
Yellows: O’Hare, Semenyo, Hyam, Dabo.
Goalscorers: Maatsen (25') Gyokeres (89')
Bristol City XI: Daniel Bentley (GK), Sam Bell (Joe Williams 76’), Tomas Kalas, Timm Klose, Jay Dasilva, Han-Noah Massengo, Alex Scott , Ayman Benarous (Cameron Pring 76’), Andreas Weimann, Antoine Semenyo, Chris Martin.
Unusued Subs: Harvey Wiles-Richards(GK), Nahki Wells, Robbie Cundy, Zachary Vyner, Tommy Conway.
Sky Blues XI: Simon Moore (GK), Todd Kane (Fankaty Dabo 82’), Dom Hyam, Kyle McFadzean©, Jake Clarke-Salter, Jake Bidwell, Jamie Allen, Gustavo Hamer, Ian Maatsen (Jordan Shipley 82’), Callum O’Hare, Viktor Gyokeres.
Unused Subs: Ben Wilson (GK), Michael Rose, Ben Sheaf, Martyn Waghorn, Fabio Tavares.