Scannell headed home Kagisho Dikgacoi's deep cross in the 92nd minute on Tuesday night to settle a dire Championship contest and snatch three points the Londoners barely deserved.
Palace had drawn their previous three games and eight of their previous 12, while Barnsley have now taken only two points from the last 21 available and could yet face a nerve-jangling relegation battle.
Midfield trio Scannell, Darren Ambrose and Dikgacoi returned for Palace, while Barnsley also made three changes.
Goalkeeper David Button, drafted in on an emergency loan, made his Tykes debut due to injuries to Luke Steele and David Preece, Stephen Dawson returned to midfield and veteran striker Andy Gray was recalled.
Palace defender Paddy McCarthy and Barnsley striker Craig Davies traded long-range thunderbolts in the opening 10 minutes, but both defences were well on top during the early exchanges.
The visitors' back-four restricted Palace to another shot from outside the penalty area that flew over the crossbar in the 22nd minute, this time from Sean Scannell, and Barnsley mustered a similar effort via striker Frank Nouble, on loan from West Ham.
Palace's Julian Speroni was the first goalkeeper called into action when he held Matty Done's thumping 30-yard drive in the 31st minute.
Speroni held Gray's header following defender Scott Golbourne's cross soon after and winger Done flashed a low shot from outside the area just wide as Barnsley finished the first half on top.
Scannell went close to firing the Londoners into the lead five minutes after the restart, but lifted his shot from inside the area over the bar, as did midfield team-mate Mile Jedinak before Palace boss Dougie Freedman sent on Jonathan Williams and Jermaine Easter for Ambrose and Glenn Murray respectively with half an hour to go.
Tykes striker Davies had two goalbound shots blocked inside a minute and midfielder Nathan Doyle lashed a 25-yard effort off target as the visitors sensed a possible three points were there for the taking.
Davies was wayward with two more fierce shots from outside the area, while at the other end Scannell's angled shot was smothered by Button.
Easter's effort from a similar position was blocked by Tykes substitute Michael Tonge in the closing stages, but Palace launched one last attack and when Dikgacoi crossed to the far post, Scannell was left unopposed to head past Button.