On-loan Scunthorpe winger Peter Winn scored in the third minute of injury time to earn Blue Square Premier side Gateshead a replay with Brentford.
Gateshead had gone ahead when Bees keeper Lewis Price dropped Winn's corner into his own net.
Carl Cort headed in a Ryan Dickson cross to level and Kevin O'Connor put the League One side ahead by volleying home after a Sam Saunders free-kick.
James Wilson hit Gateshead's bar before Winn fired into the roof of the net.
Brentford manager Andy Scott told BBC London 94.9:
"At set-pieces they attacked the ball well, had good delivery and good height.
"But they put in a long throw, we went to clear it and it gets a deflection which went to their spare man who was just lurking and that's been the story of it for the last few weeks really.
"I'm disappointed we haven't gone through but if you give teams too many chances then you're going to be in trouble."
RELATED INTERNET LINKS:
BBC Sport blog on Gateshead
FA: The FA Cup
Football on the BBC
Your say - 606
The BBC is not responsible for the content of external internet sites