Warriors trailed 13-0 at the interval, but second-half tries from Max Williamson and Lucio Sordoni helped them to a 17-13 win that took them up to second in the URC table.
"Quite rightly we got a bit of a rocket at half-time from the coaches," said Glasgow hooker Johnny Matthews.
"There were questions about the effort levels in the first half, that Cardiff maybe wanted it more than us which was a bit of a poke in the chest for some boys.
"I think the reaction showed that it clearly worked and we'll be better for it.
"Seventeen unanswered points in the second half shows the real character of the squad. Hopefully we can kick on now."