Former Highbury junior Liam Chilvers came up with a precious winner for Paul Simpson's Preston and keep them hot on the heels of the top two.
And the goal - the second for the 24-year-old centre-back since he arrived on a free from Colchester in the summer - spared the blushes of five-goal striker Brett Ormerod.
Seconds before the goal the Preston frontman saw a simple chance go begging and Nick Colgan turned his effort away for a corner.
And it was from the 55th minute corner swung in by midfield creator Paul McKenna that Chilvers leapt at the far post and headed in as sloppy Barnsley left him unhindered.
Defeat for Barnsley left the Yorkshire side - and their recently appointed manager Simon Davey - deep in relegation trouble and with a tough time ahead scrapping to stay in the Championship after promotion last year.
Despite being outplayed for much of the game Barnsley were dogged by bad luck and hit the woodwork twice and came close to a late leveller in a high-energy finish.
In a grim forgettable first half Preston failed to demonstrate the form that has taken them to within striking distance of the top-flight.
Tykes defender Paul Reid almost gifted the visitors a dream start after ten minutes when he almost prodded the ball past his own keeper after Chris Sedgwick whipped in a neat cross. Calum Davidson's follow-up effort was blocked by keeper Nick Colgan.
North End might have been ahead after 14 minutes when David Nugent produce a clever low cros,s but when Lewis Neal tried to thread his shot through a crowded area it smacked against Reid.
Barnsley's Danny Nardiello twisted and turned at the other end and as he ran out of options drilled his low shot wide from 18 yards.
Nugent set up Neal again as Preston's neat passing produced another opportunity, but Neal scuffed his shot and Colgan collected without fuss.
Sedgwick on the right rounded Barnsley debutant Adam Eckersley, on loan from Manchester United, to produce another smart ball into the area but McKenna headed wide.
But Barnsley came closest with only their second effort of the half when Paul Hayes latched on to Colgan's big clearance from the back and added a clever touch to help it over Carlo Nash who was off his line. But the relieved keeper saw the ball drop onto the bar and over.
Ormerod came close to giving Preston a dream start to the second half when he spun cleverly 20 yards out and lashed an angled shot that Colgan held onto.
McKenna went close with a dipping shot over before the flurry that brought Chilvers the goal in the 55th minute.
The goal gave Preston the boost they needed but they were short on clear-cut chances as the home side defended desperately.
And on the break Barnsley caught Preston on the hop, as Danny Nardiello's low shot cannoned off the foot of the post.
In the dying minutes Preston keeper Nash came close to scoring with a wind-assisted clearance which Colgan had to push over his own crossbar.