It was their seventh win in a row and fifth successive five-pointer to claim a new league record surpassing the one set by the Dragons in 2004.
The bonus-point win puts them equal with Ulster on 61 points at the top of the league and with the better points difference they become the leaders.
Glasgow found themselves trailing 13-10 at the break thanks to a try for the Blues by Josh Navidi converted by Rhys Patchell who also kicked two penalties.
However Glasgow came together in the second half to add tries from Niko Matawalu (two) and Duncan Weir to the first-half effort by Pete Horne. Weir kicked three conversions and a penalty.
Glasgow made a slow start with their pack, reinforced by the return of Scotland squad men Jon Welsh, Pat McArthur and Al Kellock, being on the wrong end of the opening scrums and Weir missing a long penalty. The hosts also lost lock Tim Swinson, who was knocked out and had to be replaced by Tom Ryder.
It took the first burst from scrum-half Matawalu in the 10th minute to induce some tempo. Thrusts by DTH Van Der Merwe and Alex Dunbar followed and the try that was coming arrived in style on 17 minutes with centre Horne carving through the centre on a 30-metre run and Weir converting.
Glasgow failed to make anything of further attacks and were punished when lively Cardiff tied the scores in 27 minutes.
Prompted by the excellent fly-half Patchell, centre Gavin Evans made the initial break, number eight Luke Hamilton then took play close to the line and Navidi got over with Patchell converting.
In the closing stages of the half Glasgow lost another forward with Ofa Fainga'anuku replacing Gordon Reid and Patchell sandwiched a penalty by Weir with a pair of his own to send his side into the interval leading by three points.
Glasgow began the second half by driving a lineout deep into the visitors' half but repeatedly lost possession so could not capitalise.
However, it all came good in the 57th minute. Crowd favourite Matawalu had moved from scrum-half to right wing and he scored the vital try after getting to his own long kick first, with Weir adding the extras.
Now able to relax, Glasgow secured the bonus points with two more tries in the next nine minutes.
The first fell to Weir after a prolonged phase of possession close to the line, with Weir making the conversion.
Finally a tap penalty was moved swiftly to the right for Manawalu to finish in style, although Scott Wight failed to convert.
- Sports & Recreation