Substitute Andy Gray made up for his side's disappointment at Plymouth last week with a coolly converted penalty on 87 minutes after Alex Baptiste had handled a long throw by Steve Foster.
Gray's unlikely winner came just two minutes after Bobby Hassell looked to have earned a point with a header from ten yards.
The home side had dominated throughout and seemed to have earned their just rewards when Charlie Adam fired Pool into the lead from the penalty spot after Ryan Shotton was harshly adjudged to have handled a Keith Southern header.
The Seasiders recovered from the loss of leading scorer Ben Burgess in just the second minute to carve out the majority of the chances.
Billy Clarke fired wide before setting up Jason Euell who hesitated and saw his shot blocked.
Euell then brought a fine safe out of Luke Steele before Barnsley's only chance of a one-sided half came immediately following a penalty claim for the home side, before Daniel Bogdanovic was denied by a smart save from Matt Gilks.
Pool livewire Clarke was forced to limp off just before the break and Ian Holloway's men lost a lot of their attacking thrust.
However Adam's seventh goal of the season in the 73rd minute looked to have set his side on their way, even bringing two further fine saves out of Steele soon after and there was no hint of things to come in a stunning three-minute spell for the visitors.