The Hoops took the lead with less than a minute on the clock at home against Hadley, with Zac McEachran netting his second goal of the season inside the opening 60 seconds of a game.
The visitors pulled level via a Luke Alfano penalty six minutes into the second half, but Corie Andrews netted the winner for City nine minutes from the end.
McEachran handed the Hoops the lead when he took on a loose ball and pinged a low right-footed effort into the bottom corner from 30 yards out.
Championship round-up: Josh Murphy scores and assists in 3-0 win over Liam Manning’s Bristol City
City had the chance to double their advantage after 17 minutes, when a slick passing move led to Andrews having a clear run on goal, however Hadley goalkeeper Charlie Taylor slid out to close the striker down.
Taylor then made a decent save from Tom Scott, while Josh Ashby smacked the crossbar from 20 yards.
Hadley levelled the third round tie early in the second half following contact between centre back Phil Croker and Jordan Edwards in the penalty box.
Alfano stepped up and sent Kai McKenzie-Lyle the wrong way from 12 yards.
The Hoops found a winner though with nine minutes left on the clock, as Louis Walsh cut the ball back for Andrews to finish from close range.
City manager Ross Jenkins said: “Having the game was great, a lot of games have been called off because of the weather, and we were fortunate enough to have the game on, but the conditions were pretty poor.
“There are no real excuses. We made it hard work, and fair play to Hadley, they gave us a real good game.
“They made us defend and they put it in our box, and they worked their socks off as well, so a big credit to them for the performance. They had to make us work for the win.
“The weather aside, it wasn’t really our usual performance. I think we had a couple of boys off it, but it’s good learning how to deal with these conditions.
“Some of the boys haven’t played in weather like this before, so it was a great learning curve for everyone.
“It’s important we move on now, the win was important, and we move on to Saturday.”
He added: “Everyone wants to get through to the next round. Hadley were standing in our way of progressing.
“It’s important we paid them respect. We went to go watch them and had some eyes on them, and they made it difficult.
“The most important thing was the win. We made it hard work, but we kept on going and kept knocking on the door.”