The home side had edged in front but Gloucester infringed in the dying seconds and Sweeney stepped up to send over a 40m penalty to finish with a 16 point haul to seal a hard earned triumph.
A severely depleted Blues side saw former Scarlet second row Adam Eustace and Wales hopeful Gareth Delve score tries while Freddie Burns (2) and Nicky Robinson sent over penalties.
The Blues hit back through full back Sam Norton Knight and Xavier Rush but with former All Black Carlos Spencer sending over two penalties, it looked like the home side had done enough to claim the spoils. However Sweeney stepped up to spoil the party with his late effort to get the Blues off to a winning start.
Nigel Davies’s young Scarlets battled to an encouraging 15-15 draw at the Stoop against Harlequins.
The Scarlets rested key players Simon Easterby and Australian No 8 David Lyons for the tie to field a relatively inexperienced side.
David Strettle scored a try for the home side along with George Robson, while Rory Clegg scored the remaining points with a penalty and conversion.
The Welsh side replied with tries from centre Gareth Maule, left-wing Andy Fenby and a penalty and conversion from Rhys Priestland.
In the last act of the game Scarlets full back Morgan Stoddart had the chance to snatch a win for the visitors but he spilled the ball with the try line at his mercy.