Hitman Kyle Lafferty made the most of a rare run-out in his natural position by smashing the winner to keep Burnley in with a shout of the playoff spots.
Lafferty has spent most of the season out on the left wing as part of manager Owen Coyle's attempt to protect him from the Championship's hatchet men.
But a double for Northern Ireland in midweek forced Coyle into a rethink and Lafferty made the most of his chance by terrorising a Barnsley side whose minds were on next week's FA Cup semi-final.
He snatched the crucial second goal after Wade Elliott had opened the scoring in the 30th minute.
Brian Howard pulled a goal back before the break and Burnley clung on for the win after Jon Macken had hit the bar for the Tykes.
Lafferty's team-mate Jon Harley said: "The goals he got in the week have been a real boost for him and the club.
Fantastic "The lad's come back flying with the great goal he scored today. I was right behind it and it was a fantastic strike." Burnley took advantage of Barnsley defender Dennis Souza heading off to the dressing room for stitches in a head wound to go two-up.
In his absence Elliott celebrated signing a new three-year contract by opening the scoring.
And Lafferty hit the second by bending the ball into the far corner from the edge of the area.
Liverpool conqueror Brian Howard gave Barnsley hope, tapping in from a yard.
And despite an FA Cup semi against Cardiff next week, defender Stephen Foster said: "I've played against world-class players from Liverpool and Chelsea so Cardiff won't scare me.
"The likes of Jimmy Floyd Hasselbaink are good players but we've been up against the best and come through.
"But I'll still be upset about this game until the Wednesday or Thursday because it was a game we should have won.
"I'm certainly not in the right frame of mind to consider the semi-final yet."