Bath had not led until the 65th minute but even when home lock James Percival responded by crashing over for the only try of the game soon after, it was the accuracy of Barkley that proved decisive.
By contrast, Andy Goode spurned a couple of kicks late on, including failing to convert Percival's 69th-minute score, which proved crucial when his opposite number landed the winning blow with the final kick of the game.
Worcester had raced out to a 12-0 with Goode initially solid with the boot as he slotted a 40-metre penalty in just the second minute.
Minutes later Bath offended in the ruck area and again the outside half was on target, this time from 35 metres.
The Warriors continued to dominate play and when Matt Banahan was penalised for not rolling away at a ruck, Goode converted his third penalty to give his side a 9-0 lead after only 10 minutes.
Worse was to follow for Banahan and Bath. The centre was yellow carded for a deliberate knock on and again Goode made no mistake with his penalty kick.
Banahan was soon joined in the sin-bin by rival captains, Stewart Hooper and Dean Schofield, who were yellow carded by young referee, Luke Pearce, after a substantial melee involving most of the forwards.
However, the Warriors failed to take advantage of their numerical superiority.
Barkley reduced the arrears with the first of his eight penalties and Banahan then returned with no damage done to his side's chances.
Goode should have restored Worcester's 12-point advantage but the outside half fired wide with a 30-metre drop-kick attempt.
Another error from the Warriors saw Josh Drauniniu fail to collect an up-and-under and another penalty was conceded for offside which Barkley kicked from 45 metres.
A simple penalty from Goode after 32 minutes made it 15-6 to the Warriors and they should have extended that lead when they blew the best try scoring opportunity of the half.
Goode, David Lemi and Josh Matavesi combined brilliantly in a sweeping 70-metre move but Lemi's scoring pass to Goode was ruled forward.
Bath scored the first points of the second half when Barkley was successful with a 45-metre penalty and the lead was soon down to three points with another simple goal from the outside half.
A handling error from Lemi and a powerful run from Banahan exerted more pressure on the Warriors defence and they conceded another penalty at the ruck area to allow Barkley to tie up the scores.
Bath were now the dominant side with Banahan becoming increasingly influential with his driving runs in midfield and they looked the more likely winners as the game entered the final quarter.
Barkley gave Bath the lead for the first time in the match with a 35-metre penalty after 65 minutes.
Stung by the reverse Worcester immediately brought on three replacements and it soon paid dividends when Percival drove over from close range but Goode's conversion rebounded back of a post which proved costly as Barkley was successful with his longest penalty of the game to give Bath a one-point lead with six minutes remaining.
Back came the Warriors to secure two penalties in the Bath 22, Goode surprisingly missed the first but kept his nerve to kick the second.
But with the last kick of the match Barkley made no mistake with his eighth penalty and with it an away victory.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.