Keith Millen's first home game as Robins boss got off to the worst possible start as his side fell two goals behind inside the opening 12 minutes.
Andy Gray scored both times, the first from the penalty spot.
However, things suddenly improved for Millen's side and quick-fire goals from Marvin Elliott and Albert Adomah put City back on level terms before the halfway point of the first half.
Adam Hammill's deflected strike shortly after the break restored Barnsley's lead before David Clarkson completed the scoring from the penalty spot.
Both managers named unchanged teams. Millen was pleased with the way his players performed last weekend in the draw against Doncaster, despite a last-minute penalty denying them all three points in South Yorkshire.
Unfortunately for Millen, his side picked up where they had left off at the Keepmoat Stadium by conceding after just four minutes.
Cole Skuse fouled Hugo Colace inside the area and Gray beat David James from the penalty spot.
Hammill went close with an angled drive before Gray grabbed his second goal of the game after 12 minutes to extend Barnsley's advantage.
Kieran Trippier's deep cross from the right found Gray and he made bo mistake from inside the six-yard box.
In between the two goals, City lost Skuse to injury and he left the field on a stretcher. He was replaced by Lee Johnson.
It all appeared to be going wrong for the Robins but Elliott reduced their arrears in the 19th minute.
Barnsley keeper Luke Steele denied Nicky Hunt but could do little to prevent Elliott from knocking the ball over him from the rebound as he lay helpless on the ground.
Two minutes later, Adomah converted Clarkson's cross to bring City level.
Proceedings calmed down a little following the equaliser and it was not until the 41st-minute that another chance materialised.
Diego Arismendi shot from 30-yards out but James was alert and smothered the danger.
Barnsley went ahead again in the 51st minute when Hammill surged into the box and his shot nicked off a City defender and past the England keeper.
As in the first half, the Tykes' lead was shortlived and parity was restored after 62 minutes when Jay McEveley fouled Ivan Sproule inside the box. Clarkson blasted home the spot-kick.
Both sides had a chance apiece to win it late on. City substitute John Akinde shot wide from 12 yards out before McEveley shot over the crossbar from a similar range.