Chris Wood continued his scoring streak to spare the Clarets a trip to Oakwell and an FA Cup third-round replay on an afternoon of penalty drama.
Burnley were denied one spot-kick by the intervention of VAR but then in stoppage time were awarded another which Wood coolly converted to make it three goals in as many games and six for the season.
The striker came off the bench to bag the winner after Burnley boss Sean Dyche had made eight changes to his starting line-up following back-to-back Premier League wins.
There were welcome returns from injury for Nick Pope, Steven Defour and Stephen Ward and valuable game time for others.
But despite an experienced line-up, captained by James Tarkowski who impressed in an unfamiliar right-back role, it was still a testing tie for the Clarets as they eased players back and looked to get past round three for only the third time in eight seasons.
The League One visitors rarely looked like scoring against Burnley's re-shaped back four, but were far from out-classed and were only minutes away from earning a replay when Liam Lindsay needlessly brought down Matej Vydra and Wood sent them out.
With Turf Moor hosting the VAR (video assistant referee) system for the first time, it was perhaps inevitable it would play a part.
And it took just 20 minutes for the technology to have its say as Burnley were denied a penalty.
Despite a 64-game wait for a spot-kick on in the Premier League, the Clarets have had their share of penalties in recent cup ties and they thought they had another when Matej Vydra was bundled over by Dimi Cavare as he ran onto an excellent pass from Defour.
Cavare was booked but, like the penalty decision, that was over-turned as referee Simon Hooper was told Vydra, who had the ball on the spot and was starting his run-up by time the information filtered through, was off-side by the width of his shirt in the build-up.
That was the major talking point of a goalless first half, which did see Barnsley have the ball in the net from a Cam McGeehan header which was ruled out for off-side without the intervention of VAR.
The League One side were lively on the break but didn’t force Pope into a meaningful save on his return to action for the first time since suffering a dislocated shoulder in the Clarets’ opening game of the season at Aberdeen way back in July.
And opposite number Adam Davies wasn’t over-worked either, Sam Vokes failing to test him from a Vydra knock-down from Burnley’s best chance before a stoppage-time header from former Barnsley loanee Kevin Long had to be touched over the bar.
Despite their own priorities of chasing an instant return to the Championship, Barnsley made just two changes to their last league line-up with the sale of midfielder Brad Potts to Preston necessitating one of them.
They had been more than a match for the Clarets but less than a minute into the second half should have gone behind, Charlie Taylor delivering a fine cross from his left-wing berth which Dwight McNeil met with a powerful header he sent the wrong side of the post.
Taylor then provided another heading chance for Vokes he couldn’t direct goalwards and with the openings starting to come, Vydra should have made more of a raking crossfield pass from Defour as Burnley began to take control.
The Clarets looked to press home that advantage with another decent move ending with a cross from Ward which Vydra headed over the top.
But for a long time that looked as though it would be as near as the Clarets would come to avoiding a replay.
And while Pope could have caught cold in an in-active second half there were two anxious moments for Burnley to survive as Barnsley sniffed a possible late upset.
Twice in the last five minutes the visitors had free-kick opportunities less than 25 yards from goal.
But neither time did Alex Mowatt or new permanent signing Cauley Woodrow hit the target and in stoppage time the underdogs saw their hopes dashed.
Lindsay’s clumsy challenge on Vydra this time lead to a clear-cut penalty and Wood accepted the chance to bury the spot-kick and take the Clarets through.
Burnley: Pope, Tarkowski, Long, Gibson, Ward (Gudmundsson 59), McNeil, Defour (Cork 78), Hendrick, Taylor, Vydra, Vokes (Wood 74). Substitutes: Hart, Mee, Barnes, Westwood.
Barnsley: Davies, Cavare, Pinnock, Lindsay, Williams, Thiam (Moncur 77), Mowatt, McGeehan, Hedges (Moore 63), Bahre (Dougall 83), Woodrow. Substitutes: Greatorex, Jackson, Adeboyejo, Brown.
Referee: Simon Hooper