The game’s pre-match talking point was the arrival of Michael Morrison, who penned a one-year deal at Fratton Park on a free deal from Reading.
The central defender was thrown straight into the action, being named in the starting XI alongside the returning Sean Raggett.
There were also first Pompey starts for Colby Bishop and Josh Oluwayemi in Danny Cowley’s youthful side at the Hive.
Predicted Portsmouth XI v Cheltenham: changes expected to side that beat Cardiff so handsomely - but attacking duo could keep places and defender set to return
Portsmouth transfer news: Blues youngsters attracting interest but Danny Cowley has no desire to cash in just yet
Portsmouth boss Danny Cowley makes transfer admission as former Luton and Millwall midfielder edges closer to Fratton Park exit
Former Portsmouth keeper Alex Bass suffers tough night on and off the pitch as he makes Sunderland debut following Fratton Park exit
League One latest: Oxford land former Pompey striker target from Swansea as Sheffield Wednesday bemoan exciting duo's move to Brentford and former Peterborough boss criticises club
Despite going behind early on, goals from Harry Jewitt-White, Zak Swanson and Dan Gifford ensured Pompey ended their pre-season on a high.
However, it was the hosts who started the better of the two teams and it was a difficult introduction for new-boy Morrison, who lost out on an early 50-50 on Ephron Mason-Clark but his effort was fired wide.
The hosts continued their strong start to the game with the Blues failing to clear the ball and after pinball in the box before the ball took a deflection off Ryan De Havilland and into Josh Oluwayemi’s hands.
And Barnet capitalised on the 12th minute with ex-Pompey strike Nicke Kabamba heading in against his former after being Morrison to a Sean Shields cross.
But after a sloppy start, the visitors levelled after 25 minutes with their first foray forward with Harry Jewitt-White scrambling the ball in from a fine Alfie Bridgman.
Pompey thought they grabbed a second 10 minutes later when Liam Vincent produced a neat turn but fired a shot just over the bar.
Moments after Bridgman found himself on the left flank and shrugged off a number of challenges to cut inside to curl an effort just wide.
It was a strong end to the first period with both Dan Gifford and Zak Swanson having attempts on goal but were unable to get the Blues ahead before the break.
After a tame opening stages to the second half, right-back Swanson found himself in plenty of space in the Bees’ penalty area and his calm effort was slotted into Laurie Walker’s net on 55 minutes.
The ex-Arsenal youngster continued to excite moments later as he made a run into the box with his shot initially blocked before Jewitt-White’s cross had to be tipped over by the Barnet keeper.
The Blues believed they should’ve been awarded a penalty on 73 minutes after Gifford appeared to be brought down in the box but the referee swiftly waved away those appeals.
The Bees thought they’d secured a late draw through Da Havilland on 88 minutes but on the stroke of full-time Gifford found his name on the scoresheet with a driven shot to secure the win.