Two minutes later, Vokes went closer when his 30-yard volley skimmed the bar, while Paddy McCourt fired just over at the other end following a surging run.
Despite sitting at the foot of the table, Barnsley grew into the game and Tomasz Cywka had two opportunities to put his side ahead.
Twenty minutes into the game, the Polish striker collected a through-ball on the wing and cut in before trying his luck, but Tom Heaton parried his effort away.
Five minutes later, an unmarked Cywka blazed the ball over the bar after good work down the right flank by Scott Wiseman.
Burnley were level in the 65th minute thanks to Michael Kightly's first goal for the club. The winger collected the ball after good work by Kieran Trippier and bent an effort into the top corner from the edge of the box.
Cywka forced Heaton into a good save with his 25-yard free kick with 15 minutes remaining, while Vokes saw his effort disallowed for offside at the other end as Burnley held on to secure the points that propelled them to the top of the league.