The Eagles came back from 2-0 half-time deficit and the points were seemingly going to be shared, only for Barnes to pop up with the late goal.
Sam Vokes had the hosts ahead inside a minute, before Johann Berg Gudmundsson struck a second just 14 minutes later.
Substitute Connor Wickham reduced the deficit and then Christian Benteke calmly dispatched a late penalty. Although Palace were left gutted when Barnes scored four minutes into added time.
Burnley take 2-0 lead
The Clarets got off to the best possible start when a Palace corner broke down in the first minute and Vokes eventually bundled the ball over the line following a swift counter-attack.
Jason Puncheon - returning to the starting eleven - almost equalised soon after but his shot was held comfortably by Tom Heaton in the Burnley goal.
Gudmunsson then doubled his side's lead, although not least with a hint of good fortune, when his 25-yard strike crept under the body of Steve Mandanda.
2-0 after 14 minutes slightly flattered the hosts, but the Eagles were often the architects of their own downfall, particularly defensively, as has been the case for much of the season. Jeff Hendrick would have had his side out of sight had Scott Dann not blocked his goalbound shot shortly before half-time.
Andros Townsend has struggled to rekindle the form that saw him perform so well for Newcastle United last season and the winger didn't have much luck at Turf Moor. His first half was summed up when he cut inside for the right wing and blazed a shot high and wide. Benteke then headed just wide of goal as the half-time whistle was met with boos by the away faithful.
Palace improve in second half but defensive incapabilities are still their downfall
Mandanda made up for his earlier error by keeping his side in the tie five minutes into the second half, twice denying Vokes a second goal. The striker then blasted over with his side very much in the ascendency.
Alan Pardew would have been fearing for his job at the break knowing side side were heading towards their four-straight defeat, but two substitutions early in the second period seemed to have brought the game level. Wickham replaced Puncheon and Zeki Fryers replaced Martin Kelly.
The former Sunderland striker needed just three minutes to give his side hope, thrashing a Wilfried Zaha cross into the top corner.
The Eagles sub then almost fed Benteke through but his strike partner was too slow and ended up wasting his opportunity.
However, the Belgian forward appeared to have salvaged a point from a seemingly lost cause from the penalty spot. Townsend's cross was handled and Benteke stepped up to send Heaton the wrong way from twelve yards.
Former Brighton striker Barnes was thrown on by Sean Dyche to seek a winner, and it ultimately came in the fourth minute of injury time. Similar to the first minute, a Palace attack broke down, Burnley countered and Barnes struck home, extending his side's excellent home form.