Mark Kelly’s side had been heading for defeat at Barnsley under-23s yesterday afternoon after falling behind to Romal Palmer’s opener.
The hosts had also managed to negotiate being reduced to 10 men following Matty Pearson’s first-half challenge on Leon Maloney.
However, Dan Smith levelled when heading home substitute Bradley Lethbridge’s right-wing cross on 88 minutes.
There was still time for a winner and in stoppage-time Lethbridge turned from goal provider to scorer when he unleashed from long range.
Ironically, Barnsley had claimed a last-gasp triumph when the sides met in an uninspiring encounter at Westleigh Park in November.
Now it was the turn of the Blues to celebrate, marking their first victory following four matches in Group F of the competition.
With injuries impacting upon the first-team squad, Pompey were forced to field a youthful line-up at Oakwell, with no senior players.
Keeper Alex Bass, Christian Oxlade-Chamberlain and Theo Widdrington were the most experienced players on show, with academy boss Kelly and coach Shaun North taking charge.
The bulk of the side contained members of Pompey’s encouraging FA Youth Cup run which ended at the hands of Leicester City last month.
Meanwhile, the Tykes included defender Pearson, with 14 Championship appearances this season, and former Blues triallist Victor Adeboyejo.
As it was, Pearson’s presence was restricted to just 24 minutes on the pitch, before he saw red following his challenge on Maloney.
Then Palmer was fouled on 38 minutes on the edge of the box and took the free-kick himself to give the hosts the lead.
As Pompey searched for an equaliser against the 10 men, Louis Wardle was denied by a superb Bass save, while Jacob Brown fired against the crossbar.
Then, on 88 minutes, Smith met Lethbridge’s cross, with his far-post header striking the underside of the bar on its way into the back of the net..
It was left to Lethbridge to seal victory when his shot flew into the top corner.
POMPEY: Bass, Oxlade-Chamberlain, Casey, Dandy, Hancott, Chandler (61 mins Lethbridge), Widdrington, Brooks (57 mins Read), Maloney (77 mins Johnston), Smith, Mayes. Subs not used: Collins, Whiting.
BARNSLEY: Walton, Smith, Pearson, Fielding, Williams, Wardle, Palmer, Wolfe (69 mins Tingle), Berkovits, Adeboyejo, Brown. Subs not used: Greatorex, Lund, Dolan, Rowe.