Barnsley, who have not gone beyond the third round since 1999, struggled to cope early on against a Blackpool side that had won three of their last our games.
The long throws of Stephen Crainey had the home defence in trouble and when Gary Taylor-Ftetcher hooked a dangerous ball across goal, Ben Burgess was a fraction short of a scoring connection.
Burgess should have tested home keeper Heinz Muller when sloppy marking left him with time and space but his header from Andy Welsh's cross drifted over the top.
The defeat was cruel luck on Blackpool who had looked in control from the start and were well worth their 32nd-minute opener.
It came when a deep cross from John Hills was headed down by Taylor-Fletcher and David Fox followed up unmarked to drive in a low shot to grab the lead.
Blackpool could have added more. A corner from Andy Welsh was headed goalwards by Ian Evatt but straight at the keeper, and when Taylor-Fletcher went on a solo run his shot was wide of the target.
Blackpool could have added more before the break as Barnsley reshaped to their usual flat midfield four instead of the diamond shape they began with.
Barnsley's meagre first-half opportunities were restricted to long-range shots and, three minutes before the break, leading scorer Brian Howard's was the best of the bunch when his 25-yard effort was just wide.
Striker Miguel Angel Mostto was also close with a pair of earlier efforts.
But Barnsley's equaliser came after 78 minutes when Mostto managed to stab the ball back to Howard following a corner.
The Barnsley skipper swung in a cross which was headed down by Dennis Souza for fellow centre-back Foster to produce a crafty back-heel from close range.
The visitors were still reeling from that setback when Simon Davey's side struck again.
This time Howard and substitute Coulson put Blackpool on the back foot before Coulson kept a cool head and lashed in a crisp angled shot for the winner that broke the visitors' hearts.