Brentford will face an FA Cup First Round replay after Gateshead scored a stoppage time equaliser to earn a 2-2 draw.
The Blue Square Premier side took the lead early in the second period but Brentford hit back to lead through Carl Cort and Kevin O'Connor.
But Peter Winn took advantage when The Bees failed to clear a long throw to lash in a late leveller.
Brentford seemed to have earned a passage through to the Second Round when they took the lead with 20 minutes remaining but a draw was the least Gateshead deserved.
Neither side took control in a poor first half and there were few clear cut chances.
Cort probably had the best when he headed a Sam Wood cross straight at Paul Farman and Marcus Bean will feel he could have done better when he acrobatically volleyed over from 15 yards at the end of the half.
Phil Turnbull fired a free kick over for the hosts, Graeme Armstrong headed wide when Lewis Price failed to gather a Craig Baxter free kick and Winn blazed an effort wide.
Farman also saved a Ryan Dickson header in the first period but it was a half that didn't deserve a goal.
The second, however, was much better and it developed into a decent cup tie.
Gateshead flew out of the blocks in the second half - Kris Gate volleyed wide and went closer with a curling effort before Turnbull shot wide.
Price made a good low save from a Daryl Clare effort but the goal the hosts deserved came from the resulting corner.
Winn curled it in towards the near post and Price palmed the ball into his own net.
Ben Strevens was immediately brought on for his début and Brentford improved markedly but James Wilson was still forced to clear a James Curtis effort off the line after the Gateshead defender flicked on a Winn free kick.
Just past the hour mark The Bees were level - Dickson put in a beautiful cross and Cort climbed highest to head in from eight yards.
Strevens should have opened his Brentford account when the ball bobbled through to him ten yards out - with only Farman to beat he managed to get the ball past the keeper but Baxter cleared.
The Bees made their possession pay with a second in the 70th minute - the home side failed to clear a Sam Saunders free kick and O'Connor lashed a volley back past Farman and into the net.
Brentford were by now well on top and had chances to seal it - Dickson was forced wide by Farman when he found himself one-on-one and could not get a shot away and Wilson headed a Saunders corner down and onto the bar from six yards moments later.
But with Brentford only a goal ahead Gateshead grew in confidence and searched for an equaliser.
Price saved a Darren Williams header, and Wilson cleared as Clare lurked, before Gate shot straight at the Brentford goalkeeper from 15 yards after he latched onto a Farman kick.
Just when it seemed Brentford were through Baxter's long throw fell to Winn and the teams will head back to Griffin Park.
Gateshead: Farman; Baxter, Curtis, Williams, Cave; Harwood (sub Phillips 75 mins), Turnbull, Gate, Winn; Clare, Armstrong (sub One 78 mins)
Subs (not used): Provett, Robinson, Francis, McDermott, Pelonde
Brentford: Price; Foster, Bennett, Wilson, Dickson; Saunders (sub Hunt 86 mins), Bean, O'Connor, Wood (sub Strevens 57 mins); Cort, Weston
Subs (not used): Moore, Legge, Osborne, Blake, Taylor
Bookings: Dickson (59 mins) (second of season), Bean (72 mins) (sixth of season)
By Chris Wickham