Bar were pegged back twice on the day, but a late winner was enough to secure all three points.
Three goals from Dejon Noel-Williams, including a late winner, was enough to secure the Scholars a 3-2 win at The Buildkent Stadium.
Bar had the lead just three minutes in when Noel-Williams converted from the spot but were pegged back by Adam Yusuff not long after.
On the stroke of half time Sammy Moore's side led again courtesy of Noel-Williams' second.
Ibrahim Olutade came off the bench to equalise for the hosts after the interval, but an 86th minute winner from the hat-trick hero gave Bar the win.
Story of the match
Bar were awarded a penalty in the third minute of the game, which Noel-Williams stepped up to take and scored, giving the Scholars the perfect start on the day.
Adam Yusuff had the equaliser in the 6th minute however, as the striker rounded Ted Collins and slotted the ball home to crown off a fast start to the encounter.
The 28-year-old hit the outside of the post later on in the tie having been on the end of a pass from Kadell Daniel.
Collins, who extended his loan until the end of the season on Friday, made a good stop to keep out Ira Jackson as the game approached the half an hour mark.
The hosts had the ball in the net in the 37th minute, but the goal was chalked off after the linesman's flag went up for offside.
Noel-Williams struck again just before the break, as Kasim Aidoo backheeled the ball into the striker's path, which he finished well after scrambling to get onto the end of the pass.
Bar were ahead at the break and despite a number of absentees from the squad, they had played well.
Noel-Williams' third and fourth goals in his last two games were the reason Moore's side went into half time with the lead.
Half time score: Folkestone Invicta 1-2 Potters Bar Town
Jackson and Yusuff combined a couple of times either side of the hour mark, with both chances forcing good stops by Collins.
Ibrahim Olutade made it 2-2 in the 65th minute in controversial circumstances.
The substitute managed to find the bottom corner to equalise in somewhat messy circumstances, which Collins believed was a handball, but the goal was given.
Bar responded well to the leveller, as Vose was forced into making a top save to deny the Scholars retaking the lead.
Moore's side were unfortunate to hit the frame of the goal as the game entered the final ten minutes.
Invicta's number one was on hand to make another fine save late on in the game also.
The pressure paid off for Bar as Noel-Williams sealed his hat-trick in the 86th minute.
A long free kick was played into the box, which led to the number 14 picking up the ball, and his deflected effort was enough to put the Scholars ahead with minutes to go.
There was a nervy moment when the hosts won a free kick just outside the box in added time, but it was dealt with.
Full time saw Bar win late on against Folkestone Invicta with a result which takes the team up to second in the Isthmian Premier Division.