Jon Macken scored a dramatic winner deep in injury time to increase the pressure on Ipswich boss Roy Keane.
Iain Hume had put the Tykes in front with a low strike early on before Stephen Foster hit the crossbar.
Liam Rosenior equalised with a header after Tykes keeper Barosz Bialkowski flapped at a Grant Leadbitter strike.
Hume missed a penalty after he was fouled by Tommy Smith but Macken scored from the edge of the box after 96 minutes to leave Ipswich rock bottom.
Keane's team has now collected just five points from their 11 Championship fixtures and Town have yet to win a league match this season.
It took a mistake from Barnsley keeper Bialkowski before Town managed to equalise, although Tamas Priskin wasted a good chance when he lost his marker but made a poor contact with Jon Walter's cross while Carlos Edwards scuffed a shot when well placed.
The home team had several chances to win the fixture before Macken did eventually snatch victory for Mark Robins' team.
Macken himself failed to hit the target just before the hour mark after Ryan Shotton's long throw reached him yards from the Ipswich goal.
Barnsley manager Mark Robins told BBC Radio Sheffield:
"We started off brightly and got our noses in front and kept them at arms length for the first half. "They scored a goal that was gifted to them and was a lifeline. In the second half they threw themselves at us and then we sneaked it at the end. "I feel for Roy, especially after what he's been through."
Ipswich manager Roy Keane told BBC Radio Suffolk:
"We just didn't defend the free-kick well enough.
"We had chances and in the last minute their keeper made a decent save and instead of wining the game you're disappointed to get the draw and then we didn't even get that."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.