The England midfielder sent the set-piece over the wall and past Swans keeper Gerhard Tremmel in the 84th minute of Sunday's Premier League clash at the Liberty Stadium to put the Toffees within two points of top spot.
The goal, and another fine individual performance, will ensure 20-year-old Barkley will again be in the headlines after a string of excellent recent displays, and it is hard to see how Roy Hodgson can leave him out of England's World Cup squad.
The hosts had levelled the affair courtesy of a Bryan Oviedo own goal soon after Seamus Coleman had opened the scoring midway through the second half, but the defeat keeps them in 11th spot.
Swans boss Michael Laudrup made five changes for the game. Tremmel, Dwight Tiendalli, Chico Flores, Wilfried Bony and Wayne Routledge were all handed recalls with Michu (ankle), Michel Vorm (knee) and Nathan Dyer (ankle) among the absentees.
Everton manager Roberto Martinez made two changes on his return to his former club. James McCarthy came back from suspension at the expense of Leon Osman in midfield, with Kevin Mirallas coming in for the injured Gerard Deulofeu.
Swansea made a positive start, with Wayne Routledge twice finding space inside the area and slicing wide of goal on the latter occasion.
The Toffees slowly started to settle and Chico Flores almost gifted them an opener when his slack pass was picked off by James McCarthy and moved to Kevin Mirallas.
The Belgian turned Ben Davies inside out, but his shot was well held at the near post by Tremmel.
Ashley Williams then made a crucial block on the winger after a misdirected Jose Canas pass had allowed him to advance on the Swansea box.
There was a pleasing flow about proceedings, although there was little in the way of goalmouth action. It was summed up when Routledge cut in to find Wilfried Bony, only for the Ivorian to fire over the bar.
Barkley, sporting a skinhead haircut, was the victim of a crunching tackle from the excellent Williams as he looked to get into the box, and the Everton starlet wasted a good chance early in the second half.
Passes from Oviedo and Steven Pienaar played Barkley in on goal as the Toffess broke, but he stumbled as he was about to pull the trigger.
Williams made a timely challenge to deny a surging run from Coleman as Everton ramped up the pressure, before Barkley produced a trademark driving run to ghost away from Jonathan de Guzman and get away a rising shot that Tremmel tipped onto his bar.
The German's next action was to pick the ball out of his net in the 66th minute.
Swansea failed to cut out an Everton throw and the ball was worked right by McCarthy for Coleman to produce a swerving thunderbolt of a strike that beat Tremmel at his near post.
The lead lasted just four minutes. Davies whipped in a cross from the left and Tiendalli got in front of Pienaar to get away a strike which deflected off Ovideo to leave Tim Howard stranded.
Oviedo's intervention meant Swansea had benefited from five own goals in the league this season, a higher tally than any of their own players have managed.
But Barkley made sure it was the visitors who took home the spoils, beating Tremmel with his superb strike to stun the Liberty Stadium.
There was still time for Hernandez and Alejandro Pozuelo to work Howard, but Swansea could not find a leveller.
The Welsh club move on to a Boxing Day encounter at Chelsea, while Everton host bottom-club Sunderland in their next fixture.