The Seagulls climb to second in the table, level on points with Southampton, after making the Bluebirds taste defeat for the first time this campaign.
Barnes' brace and Will Hoskins' late effort enough to secure all three points, despite a late consolation for Peter Whittingham from the penalty spot.
Despite good opportunities for Robert Earnshaw and Kenny Miller, Cardiff were undone by resolute goalkeeping from Casper Ankegren and the dynamic one-touch philosophy of Gus Poyet's south coast outfit.
Joe Mason replaced Aron Gunnarsson in the home line-up, with Matt Sparrow deputising for injured Brighton winger Will Buckley, the League One club's record purchase from Watford.
Brighton were denied an early opportunity to take the lead in the sixth minute after making a spirited start.
Inigo Calderon snuck a low cross from the right wing for an eager Craig Mackail-Smith to blast against David Marshall, Gary Dicker threading the rebound through to Barnes, who slotted home but was given offside.
As the hosts were kept comfortably at arm's length, Andrew Taylor made a rare foray into the Brighton half, only to be brought down by Calderon. Craig Conway volleyed just beyond the upright as his free-kick bounced off the Cardiff wall and conveniently on to his right boot.
And in the 32nd minute, Earnshaw conjured up an audacious shot from distance which Ankegren did well to smother. Miller then produced a copycat effort from the restart but Ankegren was well-placed to make an easy catch.
The former Leeds stopper was equal to Cardiff's best opportunity of the first half, tipping a fizzing shot around his post when Conway found himself in good space in the penalty box.
The Seagulls were rewarded for their resolute defending in the 39th minute, Barnes stealing on to a loose ball in the centre circle, surging forward before driving the ball under Marshall's outstretched glove and into the bottom-left corner.
Barnes might have doubled the advantage just before half-time, but his swerving drive from 30 yards soared over the bar.
Cardiff began the second half with intent, Don Cowie's clever through ball finding Kevin McNaughton, who weaved through the bright green shirts of Brighton only to see his attempt blocked bravely by Lewis Dunk.
Uncowed, Brighton bustled forward to catch the Welsh side napping. Mackail-Smith stormed unopposed into the box only to tap his shot against the right post and out of play.
Cardiff's frustration doubled in the 62nd minute as Mark Hudson conceded a penalty by felling an onrushing Mackail-Smith in the area. Barnes duly obliged from the spot, beating Marshall to his left with a placed shot.
The hosts responded by introducing French striker Rudy Gestede at the expense of Earnshaw but the result was confirmed on 87 minutes when Hoskins raced on to Mackail-Smith's pass to tap home to the cheers of the travelling faithful.
Whittingham gave the remaining fans at the Cardiff City Stadium something to cheer about as he bettered Ankegren from the penalty spot after Liam Bridcutt's foul on Miller, but it was too little too late.