Daryl Murphy's early goal proved enough to give Town the points at Portman Road.
The Sunderland loanee was in the right place to tap the ball into the net for his sixth goal of the season on four minutes after Pablo Counago had hit the post.
Counago, Jack Colback and David Norris all went close to adding a second for Blues in a game of few chances, while substitute Iain Hume had Barnsley's best opening, his shot blocked by David Wright eight yards out.
Roy Keane made four changes to the side that went down at Watford in midweek, Counago coming in up front, with Carlos Edwards and David Norris handed midfield starts, Wright returning at right-back.
Town could have been ahead before Murphy's opener, the Republic of Ireland international bursting on to Counago's pass but as he prepared to pull the trigger, Ryan Shotton got in a challenge.
Town appealed for a penalty and what would have been a certain red card but referee Neil Swarbrick played on and the danger was gone.
Blues only had to wait another minute to grab the advantage though, Counago again central, robbing Tykes' 'keeper Luke Steele on the sidelines and curling the ball towards the empty net, Murphy on hand to tap the ball in after it had come back off the post.
The impressive Jack Colback fired wide as Town dominated the early exchanges, Edwards then pulling the ball back past the advancing Counago and Murphy as they raced into the box.
Counago dragged his shot wide after good work by Shane O'Connor, the Spaniard then crowded out after Gareth McAuley's header had been clawed away by Steele.
Bobby Hassell landed in the photographer's pit and had to receive lengthy treatment, Jon Walters curling a right-footed effort just wide after a terrific crossfield pass from Colback before Hassell was in the wars again, taking a hefty challenge from Colback that earned the Sunderland loanee a yellow card.
Shotton and then Counago picked up bookings in the last stages of a first-half that started with Town in control but finished with Barnsley growing into the game.
The Tykes maintained their momentum as the second-half got underway, Daniel Bogdanovic shooting over, then seeing another effort blocked by Damien Delaney. Former Town loanee Jon Macken crowded out as he tried to find space in the Blues' box.
Town made a double change just before the hour, Counago and Edwards making way for Jaime Peters and Connor Wickham and they instantly combined to see the ball hit the back of the visitors' net but the offside flag was raised before Wickham volleyed in from virtually the goalline.
Hugo Colace became the fourth player booked for a foul on Walters, Norris then testing Steele with a left footed effort from the edge of the box.
Macken made way for Iain Hume for the last 20 minutes, teenager Reuben Noble-Lazarus, who became the youngest Football League player when he played for the Tykes aged 15 at Portman Road last season, replacing Emil Hallfredsson soon after.
Colback whipped a cross in that took a deflection before landing on the top of the net as Blues searched for that crucial second goal while at the other end, Hume saw his left foot shot blocked by Wright.
Jacob Butterfield replaced Nathan Doyle, Murphy also pulled out of the action for the last 10 minutes, Grant Leadbitter his replacement in the final changes for both sides.
Four minutes of added on time ensured a nervy finish to the game with Bogdanovic denied twice in the same move by the alert Wright but Town held on to pick up three vital points.
Town: B.Murphy, Wright, McAuley, Delaney, O'Connor, Edwards (Peters 56), Colback, Norris, Walters, D.Murphy (Leadbitter 81), Counago (Wickham 56). Subs not used: Lee-Barrett, Garvan, Healy, Smith. Booked: Colback, Counago.
Barnsley: Steele, Hassell, Foster, Shotton, Potter, Teixeira, Colace, Doyle (Butterfield), Hallfredsson (Noble-Lazarus 73), Macken (Hume 70), Bogdanovic. Subs not used. Preece, Moore, De Silva, Gray. Booked: Shotton, Colace.
Att: 20,558













