Aaron Pierre scored a sensational late long-range winner to set-up a money-spinning glamour tie at home to Liverpool .
The defender's heroics settled the tie which was poised to go to extra-time.
Sam Ricketts' League One hosts can now look forward to a televised visit from the Premier League leaders on Sunday January 26.
Championship Bristol City had their chances but showed why they are trying to sign Arsenal's England U21 striker Eddie Nketiah on loan.
City are desperate to beat off competition from Aston Villa, Norwich, Sheffield Wednesday and Nottingham Forest to sign the 20-year-old on loan.
This replay underlined why as City's strikers like Famara Diedhiou badly mis-fired.
But Pierre clinically buried a low left-foot shot from 25 yards into the bottom corner in the 89th minute.
Earlier Town keeper Joe Murphy had to dive to his right in the eighth minute to palm away a piledriver from Josh Brownhill.
Andreas Weimann then had a sight of goal but miscued in the home penalty area.
The visitors nearly took the lead in the 22nd minute when Nathan Baker's header came back off the far post.
At the other end Town skipper Ollie Norburn had a shot deflected just wide.
And striker Daniel Udoh, leading the line on his own, forced keeper Daniel Bentley into good save with a left-foot shot from the top of the box.
But Robins striker Diedhiou blew a great chance to break the deadlock in the 44th minute when he raced clear and hit a left-foot shot over.
Diedhiou failed to hit the target again soon after the re-start with a low shot across goal.
But Shrewsbury striker Callum Lang almost scored seconds after coming on in the 70th minute.
His close-range header was superbly saved by keeper Bentley from Shaun Whalley's cross.
And Shrewsbury finished strongly to clinch a tie with Liverpool which could bank the club over £300,000.
Ads Links by Easy Branches
Play online games for free at games.easybranches.com
Guest Post Services www.easybranches.com/contribute