The 30-year-old, who kicked over 16 points at the Recreation Ground, will now join Racing Metro after recently agreeing a deal with the French side.
"I am just happy having won four points today," he said. "The last thing I wanted today was an unhappy changing room after losing three games on the bounce. That was my main priority.
"Walking across the pitch after the game, the realisation that I won't be doing it again in a Bath jersey is quite sad. But I've had a fantastic time here, and it is time to move on to a new challenge.
"I will leave this place with a heavy heart, but also with a happy one. I have watched the Top 14 quite a bit. It is a league that I have admired, and I am looking forward to going there."
Barkley spent the first seven years of his career at the Rec before returning in 2009 after a short-lived spell with Gloucester.