Aldershot booked their place in the third round of the FA Cup for the first time in their history after falling behind to an early Basingstoke goal.
Matt Warner's left-wing break set up the first goal of the game on four minutes when Neville Roach volleyed in.
But a near carbon-copy strike from Louie Soares set the visitors on track.
Soares was on hand to drill in a loose ball from a corner to give Aldershot the lead and a wonderful curling effort from Darren Barnard sealed the victory.
Basingstoke: Searle, Ray, Bruce, Watkins, Dolan, McKay (Townsend 90), Cristian Levis, Surey, Roach, Taylor, Warner.
Subs Not Used: Jones, Howell, Brown, Quarm.
Booked: Taylor, McKay.
Goals: Roach 4.
Aldershot: Bull, Smith, Anderson, Day, Barnard, Soares, Scott, Molesley, Joel Grant (Pritchard 90), John Grant, Williams (Harding 65).
Subs Not Used: Wells, Lee, Ridgeway.
Goals: Soares 14, 30, Barnard 51.
Att: 3,300
Ref: P Melin (Surrey).