The hosts took the lead midway through a dull first half but the Reds were much improved after the break and levelled through Leroy Lita before Martin Cranie won it.
The game brought Barnsley their first goals and points of the season after losing the opening league match a week earlier then crashing out of the League One against Crewe in midweek.
Danny Wilson made two changes from the cup game on Tuesday with James Bree dropping to the bench and Reuben Noble-Lazarus being left out of the squad. Luke Berry and Joe Dudgeon returned to the line-up.
The Reds almost took the lead after 90 seconds when Sam Winnall's header from Keith Treacy's cross was tipped just over by Scott Shearer.
Crewe went 1-0 up on 22 minutes when Billy Waters, who also opened the scoring in the first game, superbly volleyed in Greg Leigh's cross.
Vadaine Oliver was put clean through at the start of the second half but too long to bring the ball down and was tackle by Cranie.
Barnsley levelled when Berry won the ball on the right wing and Winnall whipped in a low cross which was missed by the home defence and Lita tapped in from six yards out.
Lita almost adds a spectacular second when he sent an overhead kick just wide after Winnall headed Conor Hourihane's left wing cross back across goal.
Oliver headed a fine chance just wide minutes before Cranie made it 2-1 to the Reds. The skipper headed in his first Barnsley goal after Lewin Nyatanga nodded Hourihane's corner towards him.
Most read sport stories