Bath were kept at bay by tremendous defence and the Blues took their chances to score points on each of their rare trips into the English club’s half proved decisive in a nail-biting encounter.
Unforced errors by the Blues, notably when Jason Spice and Ben Blair left a kick to each other, ended with Bath taking the lead through a penalty from giant full-back Jack Cuthbert.
But the home side hit back immediately, fly-half Nicky Robinson feeding an inside pass to brother Jamie for the centre to shrug off a tackle and send flanker Maama Molitika under the posts for Blair to convert.
Offences by the Bath front row gave Blair the opportunity to kick two penalties from virtually the same spot 40 yards out, but from then until the interval it was backs to the wall for the Blues.
Rugby league convert Shontayne Hape, number eight Daniel Browne and wing Andrew Higgins began to find gaps in the Welsh rearguard, but some tremendous tackling kept them at bay.
The visitors also contributed to their own failure to capitalise on massive advantages in territory and possession.
Browne lost the ball in a tackle after trying to barge through despite an overlap on the right and there were numerous examples of the last pass going astray.
With half-time statistics showing the Blues had made 97 tackles in the first period, Bath must have been amazed that they were still 10 points behind.
It was the Blues who attacked early in the second period, but they too were unable to reach the line and their pressure ended with Spice sending a drop goal attempt wide.
Bath soon restored their first-half supremacy and that pressure saw Wales squad man Tom Shanklin sent to the sin-bin while wing Joe Maddock slotted over the penalty.
However, a penalty conceded from the restart enabled Blair to restore the gap.
Bath skipper Alex Crockett broke from a ruck and raced 50 yards before once again heroic defence kept the visitors out.
Maddock then cut through to be halted just short by a high tackle from Spice. Referee Nigel Owens immediately awarded a penalty try, but Maddock incredibly missed the easy conversion.
Encouraged, the Blues came back into things, but Blair was wide with a penalty and Jamie Robinson was hauled back for a knock-on.
A clearance kick by Bath fly-half Shaun Berne was charged down by Deiniol Jones, and from the resulting five-yard scrum prop Taufa’ao Filise forced his way over.
Bath stormed back once more with a gallop by Samoan replacement Jonny Faamatuainu, breaking through tackles, ending with Higgins sprinting in for a try which Berne converted.
But that was it for Bath, with Blair having the final word with an injury-time penalty after visiting replacement Stuart Hooper was given a yellow card.