Seagulls captain Greer grabbed his first goal for the club moments before half-time, and winger Harley ensured Gus Poyet’s side got back to winning ways after the break.
Barnsley had their chances, notably when David Perkins was denied by the bar.
But Brighton, who topped the table after the first month of the season, deservedly brought an end to their recent slump and climbed back into the top half.
Poyet has staunchly stuck to his philosophy of passing football despite results going against them, and he certainly had the game’s one genuine class act pulling the strings at left-back.
Unfortunately for Brighton, Mauricio Taricco is 38, the club’s assistant manager and has already retired from playing once this season, only to be coaxed back due to a spate of injuries.
Yet the former Tottenham defender was superb at both ends of the pitch, assured in defence while prompting some of his side’s most dangerous attacks.
It was Taricco’s clever through-ball which sent Craig Noone clear to cross for Harley, whose shot hit the side-netting in the opening stages.
Brighton survived a scare on the half-hour when Tykes midfielder Perkins curled in a shot from the edge of the area which on-loan Newcastle goalkeeper Steve Harper had to tip on to the bar.
Moments later Harper was in action again, palming Jacob Butterfield’s fierce drive wide.
But it was Brighton who went ahead a minute before the interval courtesy of a needless free-kick, when Danny Drinkwater shoved Inigo Calderon out near the touchline.
Barnsley failed to deal with Noone’s delivery, Lewis Dunk had a shot blocked and the ball fell for Greer to lash low into the net.
Barnsley rallied after the break but Perkins and former Seagull Craig Davies passed up half-chances to level.
But instead Brighton grabbed the game’s crucial second goal when headers from Noone and Paynter sent Craig Mackail-Smith scampering through.
The Scotland striker’s shot was pushed up on to the bar by Tykes keeper Luke Steele, but when it landed at the feet of Harley the winger made no mistake from eight yards.
To Barnsley’s credit they continued to attack, but Greer cleared Ricardo Vaz Te’s effort off line, Harper saved from Butterfield and the tireless Taricco blocked Matty Done’s shot as the hosts held out.