Chris Wood scored a last-gasp penalty to break Barnsley hearts and send Burnley into the fourth round of the FA Cup with a 1-0 win.
The Reds more than matched their top-flight opponents and were on course to take the Clarets back to Oakwell for a replay.
But Liam Lindsay fouled Vydra in the box at the death and Wood stepped up to score his third goal in as many matches, leaving the Tykes with just one victory in their last 11 matches at Turf Moor.
Barnsley had a first-half goal disallowed for offside, but were also grateful for the Video Assistant Referee when a spot-kick was overturned.
Visiting goalkeeper Adam Davies had to be alert to keep out an early header from Wales striker Sam Vokes.
The Tykes grew into the game as Mamadou Thiam crashed a long-range shot, which was deflected, just wide.
Then the major talking point of the first half arrived in the 20th minute when Vydra went down under the challenge of Dimitri Cavare.
Referee Simon Hooper pointed to the spot and the decision went to VAR but was overturned when replays showed the striker received the ball in an offside position.
The incident left the Tykes’ faithful chanting ‘Oh VAR, oh VAR’ and Burnley boss Sean Dyche furious.
In-form striker Cauley Woodrow, whose move to Oakwell became permanent this week, had a couple of efforts which failed to severely trouble fit-again England goalkeeper Nick Pope.
Barnsley thought they had gone ahead on the stroke of half-time when Cameron McGeehan headed Ben Williams’ cross past Pope, but he was adjudged to be offside.
Dwight McNeil dragged a shot wide and Davies denied Burnley an opener in stoppage time, tipping over a James Tarkowski header from a Steven Defour corner.
The unmarked McNeil then had a glorious chance to break the deadlock a minute after the interval, somehow managing to head Charlie Taylor’s cross wide.
Thiam curled a free-kick over and, as the game started to open up, Vokes and Vydra both missed the target for the hosts.
Vydra had another chance shortly after, heading Stephen Ward’s cross over Davies’ crossbar, but Burnley were left frustrated.
Barnsley even had two decent chances to nick it from free-kicks in the latter stages, but neither Mowatt or Woodrow could take advantage.
However, Wood was introduced in the 74th minute to boos from the away end and the former Leeds striker had the final say from the spot to leave Barnsley heartbroken following an impressive display.
Barnsley: Davies, Pinnock, Lindsay, Hedges (Moore 64), McGeehan, Woodrow, Cavare, Bahre (Dougall 83), Thiam (Moncur 78), Mowatt, Williams.
Subs: Greatorex, Jackson, Adeboyejo, Brown.
Burnley: Pope, Tarkowski, Long, Gibson, Ward (Gudmundsson 59), McNeil, Defour (Cork, 78), Hendrick, Taylor, Vydra, Vokes (Wood 74).
Subs: Hart, Mee, Barnes, Westwood.
Referee: Simon Hooper