The Reds bow out of this year's Emirates FA Cup at Turf Moor.
A last-gasp penalty tucked away by substitute Chris Wood saw Barnsley eliminated at the third round stage of this year's competition.
It was a cruel blow after Daniel Stendel's side had dominated for large spells against their Premier League hosts.
Inside 10 minutes Mike Bähre looked to have beaten the offside trap as he homed in on the box but the linesman wrongly flagged him offside.
It was the Reds on top and soon, Mamadou Thiam tried his luck from 25 yards out only to see his effort take a deflection sending the shot wide.
But on 21 minutes, controversy. Steven Defour's through pass was latched onto by Matej Vydra and the £10,000,000 striker looked to be clipped slightly inside the box by Dimitri Cavaré. The referee blew for the spot-kick.
However, with VAR in operation, the decision was overturned as the striker was ruled to have been offside before the challenge.
Thiam again tried from range but to no avail, and one of his corners was scrambled away from goal with a Reds player unable to force home.
Barnsley thought they'd scored when Ben Williams' cross was nodded home in front of the goalkeeper by the impressive Cameron McGeehan, but again, the officials chalked it off for offside.
Reds skipper, Adam Davies parried a Kevin Long header over the bar, but at the break, the sides went in level.
HALF TIME: Burnley 0-0 Barnsley
Straight from the restart the home side ought to have gone in front. It was a Charlie Taylor cross to the far post and Dwight McNeil planted a header wide when it looked certain he'd put Burnley ahead.
Kieffer Moore replaced Ryan Hedges after the hour, his first appearance following a recent back problem.
Williams was booked for a late sliding tackle on Clarets' sub Gudmundsson, and then Wood was introduced with 15 minutes remaining.
George Moncur and Kenny Dougall were brought on, and in the last five minutes the Reds had two great chances with free-kicks on the edge of the box.
Alex Mowatt curled his inches wide, Woodrow blazed his over the crossbar, and then came the sucker punch.
Vydra looked to be going nowhere in the box and to the left, but Lindsay jumped in and caught the man, a definite penalty and up stepped Wood to fire home and send Sean Dyche's men into the next round.
FULL TIME: Burnley 1-0 Barnsley
Davies, Cavaré, Pinnock, Lindsay, Williams, Mowatt, McGeehan, Bähre (Dougall), Thiam (Moncur), Woodrow, Hedges (Moore).
Unused: Greatorex, Jackson, Adeboyejo, Brown.