Match ends, West Bromwich Albion 2, Bristol City 2.
James Morrison struck a last-gasp equaliser to spare West Bromwich Albion's blushes and deny Bristol City a shock victory at The Hawthorns.
The Premier League side led when Saido Berahino curled the opener within four minutes of coming off the bench.
But Jonathan Kodjia headed the Championship side level, before substitute Kieran Agard tapped in.
They looked set to progress, but Morrison turned in a Jonny Evans knockdown in the fifth added minute.
Morrison's fourth goal of the season capped a remarkable final quarter of the tie, as all four goals arrived late and Steve Cotterill's side will ultimately be distraught they are not guaranteed a fourth-round position.
With only six named substitutes and their squad stretched, City were forced to introduce 19-year-old goalkeeper Max O'Leary at half-time in what was his first senior appearance for any club.
West Brom manager Tony Pulis spoke of his affection for the tournament and his frustrations with fixture congestion ahead of kick-off.
He will no doubt breathe a sigh of relief, but the prospect of a replay sandwiched between a trip to Southampton and a home fixture against Aston Villa will not be too enticing.
Gutsy City come so close
City could have been forgiven for fearing the worst against higher-level opposition as they arrived with just one win in 10.
But, roared on by 5,300 travelling fans, they showed spirit and had 49% of the ball, with Kodjia missing the game's best chance shortly before Berahino struck.
Currently 22nd in the Championship, a replay between the visit of Middlesbrough and a trip to Leeds will fully test an already stretched squad.
But they can draw huge positives from their fightback and just seconds stood between them being the only lower-league side to beat Premier League opposition on FA Cup third-round Saturday.
Last-gasp, but still in it
Pulis' side will rue a slow start, with only half chances for James McClean and Morrison before the break, though McClean did see a header cleared off the line after the interval.
Pulis - who refused to talk about a reported Tottenham move for Berahino this week - will face more questions over the 22-year-old in January, though the pair shook hands as the opening goal was celebrated.
Berahino has made just eight league starts this season and Tottenham's reported will to let Andros Townsend move as part of any deal perhaps indicates they badly want the young striker.
At the other end, the return of Ben Foster will provide Pulis with less of an ongoing headache.
In his first appearance since overcoming a cruciate knee-ligament injury sustained in March, Foster looked in control until Kodjia headed home and Luke Freeman's shot forced a parry to give Agard a simple tap in.
The Baggies deserve credit for not panicking when faced with embarrassment and they seem intent on mounting a challenge for a sixth FA Cup success with a strong team on show.
But, with just three wins on the road this season, they will have to summon a big effort at Ashton Gate.
What the managers said
West Brom boss Tony Pulis: "It's tough on them but I thought between the two boxes we played some good football and got in some wonderful positions, but our quality in the final third was just lacking.
"I'm pleased that we kept going and the players are fantastic in that respect, they're a fit group of lads. But we will certainly have to manage them now in that respect with the number of matches in the coming weeks."
Bristol City manager Steve Cotterill: "It was a great performance from us but often you don't get two opportunities against a Premier League team and I felt for our second-half performance we did deserve to win the game.
"That would have done wonders for our season in the second half of the Championship, it's so disappointing. It was important for us."
West Brom travel to Chelsea on Wednesday, while Bristol City can move out of the Championship's bottom three when they host Preston on Tuesday.
- 4ChesterSubstituted forDawsonat 63'minutes
- 7MorrisonBooked at 42mins
- 14McCleanSubstituted forMcManamanat 63'minutes
- 17LambertSubstituted forBerahinoat 63'minutes
- 1FieldingSubstituted forO'Learyat 45'minutes
- 17BakerBooked at 72mins
- 18WilbrahamBooked at 45minsSubstituted forBurnsat 82'minutes
- 22KodjiaBooked at 75minsSubstituted forAgardat 83'minutes
- Graham Scott
- Shots on Target
Second Half ends, West Bromwich Albion 2, Bristol City 2.
Goal! West Bromwich Albion 2, Bristol City 2. James Morrison (West Bromwich Albion) right footed shot from the centre of the box to the top right corner. Assisted by Jonny Evans.
Stéphane Sessegnon (West Bromwich Albion) wins a free kick in the defensive half.
Foul by Kieran Agard (Bristol City).
Corner, West Bromwich Albion. Conceded by Joe Bryan.
Saido Berahino (West Bromwich Albion) wins a free kick in the defensive half.
Foul by Marlon Pack (Bristol City).
Attempt missed. Callum McManaman (West Bromwich Albion) right footed shot from outside the box misses to the right.
Craig Dawson (West Bromwich Albion) wins a free kick in the defensive half.
Foul by Kieran Agard (Bristol City).
Foul by Saido Berahino (West Bromwich Albion).
Korey Smith (Bristol City) wins a free kick in the defensive half.
Goal! West Bromwich Albion 1, Bristol City 2. Kieran Agard (Bristol City) right footed shot from the right side of the six yard box to the centre of the goal.
Substitution, Bristol City. Kieran Agard replaces Jonathan Kodjia.
Substitution, Bristol City. Wes Burns replaces Aaron Wilbraham.
Delay in match James Morrison (West Bromwich Albion) because of an injury.
Chris Brunt (West Bromwich Albion) wins a free kick in the attacking half.
Foul by Mark Little (Bristol City).
Jonathan Kodjia (Bristol City) is shown the yellow card for excessive celebration.