United's team was not lacking in star quality, with Paul Pogba – returning from suspension – starting alongside the likes of Marcus Rashford, Zlatan Ibrahimovic and Anthony Martial, but City produced a marvellous performance, Smith's last-gasp winner sparking scenes of jubilation and a pitch invasion at Ashton Gate.
Ibrahimovic and Rashford both hit the woodwork in the first half, but United were by no means in control and City opened the scoring as Joe Bryan netted emphatically just after the break.
An equaliser followed swiftly, though, with Ibrahimovic – making his first start of the season – scoring a free-kick, eight months on from his last goal after a long injury layoff.
And although United continued to create chances, with Romelu Lukaku going close a couple of times, City also remained a potent force in attack.
When extra-time appeared to be beckoning, Smith latched onto Matt Taylor's fine pass and blasted in from close-range in the very last minute to send the Robins into the final four.
Victory was rich reward for a City side that never looked intimidated and the first chance fell to them, as Sergio Romero tipped over a Josh Brownhill free-kick after just six minutes.
United soon woke up and went close themselves, with Ibrahimovic seeing a deflected effort come back off the crossbar following Pogba's cross.
The visitors struck the frame of the goal for a second time in the 21st minute – Rashford hitting the inside of the right-hand post from 20 yards.
Still City looked unperturbed, despite United's chances, and they looked destined to break the deadlock just before the interval.
Smith played a quick one-two with Bobby Reid on the edge of the area and darted into the box with only Romero to beat, but Daley Blind tracked his run and made a vital last-ditch tackle.
They were not to be denied just after the break, however.
Bryan raced on to a brilliant reverse pass played in behind Marcos Rojo by Marlon Pack and then unleashed a stunning left-footed drive into the top-far corner, leaving Romero utterly helpless.
Ibrahimovic restored parity just before the hour mark, however, skimming a 20-yard free-kick under the City wall and finding the bottom-right corner via a slight deflection.
255 - Zlatan Ibrahimovic has scored his first Manchester United goal since April (vs Sunderland); 255 days ago. Parity. #BRCvMUN— OptaJoe (@OptaJoe) December 20, 2017
Mourinho soon introduced Lukaku and Henrikh Mkhitaryan – making only his second appearance since November 5 – and the Belgian nearly got United's second 14 minutes from the end, but Luke Steele pushed his header wide with a fine save.
Chances continued to flow at both ends of the pitch, with the lively Jamie Paterson shooting just over for City, before Steele again did brilliantly to stop Lukaku.
But just when an extra 30 minutes looked certain, City pounced on a Scott McTominay error and Smith kept his cool from 10 yards at the end of an incisive move to secure Lee Johnson's men a shock place in the semi-finals.