Jamie McDonald bundled home Dylan Vassallo’s cross in injury-time just minutes after Liam Goulding had equalised from a corner in the replay at Moss Lane.
It means a long trip south in the New Year to face National League side Ebbsfleet United.
It was the third meeting between these two already this season, the previous two both finishing goalless at Cantilever Park, including their first attempt in this tie on Saturday.
And it proved third time lucky for the Yellows in more ways than one – this was the third successive round of the competition that they have needed a replay to progress, having beaten Ashton United and Tamworth in similar circumstances in previous rounds.
In many ways, it was another example of a stalemate game between two top teams that cancelled each other out.
Much like the previous two encounters, there wasn’t much in the way of clear cut chances.
That said, Warrington ought to have done better on seven minutes when a clever flick by Vassallo released Scott Bakkor on the inside right, and his cross flashed across the box when finding a blue shirt was probably easier.
Gradually, Altrincham worked their way up the pitch capitalising on some sloppy passing from the Yellows in midfield.
John Johnston danced through a few tackles on 19 minutes only to have it pinched off his toes by team mate Shaun Miller, who was denied by Tony McMillan.
McMillan’s own blushes were spared on 27 minutes when he allowed Johnston’s cross to squirm through his legs, and Goulding had to sweep up off the line.
The goalless scoreline at half time had most wondering where a goal would come from.
They didn’t have to wait long, as Jordan Hulme finally ended 234 minutes between these two without a goal.
Following a succession of corners, he took on a bouncing ball and finished nicely in the bottom corner.
It felt like one goal might just be enough to win the match, as the Yellows huffed and puffed but couldn’t find a killer chance.
James Poole could have finished it 10 minutes from time, dragging wide of the far post from 20 yards.
But just as it looked like the Yellows were running out of time, a corner won by debutant substitute Steven Milne down the left enabled a ball to come in to the box and from it Goulding swept home after McDonald had flicked on.
All of a sudden the momentum was with the visitors and they were unfortunate not to get a free-kick in a dangerous position when McDonald was scythed down.
Neither side really wanted extra time but it was the Yellows who seemed most likely to do something about that, and so it proved.
Milne won a second ball in midfield and played Vassallo in down the right channel, and Vassallo’s low pass across the face took a touch and was bundled in at the back post by a jubilant McDonald.
There was still time for more drama – after a brief stoppage owing to a smoke bomb being thrown on the pitch by the home support – as Altrincham hit the post twice in the dying seconds, first from a mishit cross and then secondly from the ensuing scramble.
Warrington held on though, and will take their place in the last 32 against Ebbsfleet on Saturday January 13.
Before that, they face a hectic festive schedule starting with a home game against Coalville (Saturday 23 Dec), before Witton Albion (away, Boxing Day), Matlock Town (away, Sat 30 Dec) and Marine (home, Mon 1 Jan).
Altrincham: Thompson, Bembo-Leta, Hampson, Jones, Harrison, Moult, Johnston (Peers), Harrop, Hulme, Poole, Miller (Hancock). Unused subs: Richman, Densmore, Sheridan.
Warrington Town: McMillan, Kinsella, McKeown, Williams, McCarten, Goulding, Bakkor (Jennings), Vassallo, McDonald, Gray (Davis), Barrigan (Milne). Unused subs: Ascroft, Carden.