A well-taken 88th minute goal by Chris Smith booked Horsham’s place in the third qualifying round of the FA Trophy.
The tie looked to be heading to a replay before the striker scored the only goal of the game with just two minutes to go at Culver Road, Lancing.
Manager Dominic Di Paola made four changes to the side beat Storrington 2-0 on Tuesday night in the Sussex Senior Cup.
Steve Metcalf, Joe Shelley, Dylan Merchant, Rob O’Toole, back after the birth of a child and Tyrell Richardson-Brown replaced benched trio James McElligott, Lewis Hyde and Lee Harding plus Charlie Harris.
Horsham looked the better side in the first half with great work by the pacey Richardson-Brown down the left wing proving a thorn in the visitors’ side.
Hornets made most of the running but did not have anything to show for it against at half-time.
Richardson-Brown forced a fine save by ‘keeper Berkley Laurencin who got low to deny him.
Metcalf also went close with a powerful drive from long-range which was pushed wide at full-stretch by Laurencin.
Potters Bar Town were feeling the effects of the departure of manager James Duncan to Evo-Stik League club Chesham, taking topscorer Eoin Casey and centre-half Steve Brown with him.
Their lack of available players meant Potters Bar could only name four players on their bench.
The second half began with Horsham again on the attack with Richardson-Brown supplying Chris Smith who turned and shot, which was kicked away by Laurencin.
Potters Bar carved out their first chance of the game in the 64th minute when Andrew Lomas’ crossed dangerously but Dernell Wynter failed to make a connection.
The Scholars made two substitutions, bringing on Aaron Morgan-Cummings replaced Bradley Sach up front while attacking right midfielder George Nicholas came on for Dernell Wynter.
Di Paola brought on Will Hoare for Rob O’Toole after 69 minutes.
Dean Lovegrove shot from outside the area which took a deflection but goes straight to ‘keeper Laurencin but it could have easily have gone in.
Horsham brought on winger Lee Harding for George Hayward with then minutes to go as they looked for inspiration to break the deadlock.
Potters Bar had been pressing and created a few late chances through Andrew Lomas which was saved by Josh Pelling and substitute Morgan-Cummings which flew narrowly over the bar and you gelt they coould grab a late winner.
However Smith gave the Horsham fans something to cheer about with just two minutes to go with a late winner, a great finish from a cross by Richardson-Brown following a ball through midfield by Metcalf.
Horsham: Pelling, Metcalf, Sparks, Lovegrove (capt), Shelley, Merchant, Hayward (Harding 80), Brivio, O’Toole (Hoare 69), Smith, Richardson-Brown
Unused subs: Hyde, Baxter
Potters Bar Town: Laurencin, Doyle (capt), Lomas, O’Leary, Budden, Grace, Wynter (Nicholas 66), Adcock, Cole, Sach (Morgan-Cummings 60), Fernandes
Unused subs: Wambeek, Taylor
Referee: Jim Paterson