The 25-24 victory is Bath's first in the Aviva Premiership since late September, while Irish now have not won since beating Sale on the last day of October.
To make matters worse for coach Toby Booth, his side led 17-9 at half-time and then only scored once in the final 40 minutes.
Irish got off to the perfect start when Chris Malone converted a Sailosi Tagicakibau try and then scored a penalty to make it 10-0.
Barkley kicked six points from penalties before Richard Thorpe powered over the line and Malone successfully kicked the conversion.
Bath trailed by eight at the break after another penalty from Barkley and they closed that gap to one when Michael Classens touched down in the second-half.
Barkley then gave Bath the lead for the first time with another penalty but Irish looked they would win when Topsy Ojo scored to make it 24-19 with 10 minutes left.
Another penalty from fly-half Barkley made the deficit two points and the England international then broke Irish hearts when he scored his sixth penalty with the final kick of the match after flanker Steffon Armitage was penalised for collapsing a maul.
Reflecting on the loss, Exiles' coach, Toby Booth, vented his frustration at the referee and the decision that cost his side a much-needed victory.
"It was a 50-50 call. He (referee Greg Garner) has made the decision, whether it's the right one? We will go through the referee assessors, and nothing will happen," he said.
"We were 6-0 on penalties in our favour in the first 30 minutes, which would suggest if you kept the ball, you got a penalty.
"It was probably the first time in my history we have been penalised twice for collapsing a maul that has not started from a lineout.
"Ultimately, there are three things that decide a contest - two teams and the man in the middle."
Booth went on to admit it was the lack of discipline from side that ultimately lost them the match.
"When you score three tries and concede one, you expect to win the game," he said.
"I have got a dressing room full of people in disbelief. I felt we did enough to win the game, but we didn't. Discipline has cost us the game."
Next up for Booth and Irish is an away clash against Saracens this Saturday (3pm ko), before their final Heineken cup match sees them face Ospreys on January 16 (3pm ko).