A long-range penalty from Rhys Patchell and two more from Leigh Halfpenny gave the Blues a cushion which they ultimately needed when Ryan Grant crossed in the 71st minute.
But the Scotstoun encounter was won in a 10-minute spell late in the first half when the Welsh side faced a series of five-metre scrums which they defended by any means possible.
Cardiff skipper Sam Hobbs was yellow-carded but Sean Maitland dropped the ball when he looked certain to cross and Niko Matawalu's try was disallowed.
Blues controlled much of the second half before the introduction of Chris Cusiter and Duncan Weir helped Glasgow gain the initiative, but the latter missed a difficult chance from a late penalty.
Glasgow head coach Gregor Townsend demanded a far more clinical display following their 29-20 defeat at the Arms Park seven days earlier but poor handling cost them throughout as they stayed bottom.
The hosts struggled to get hold of the ball in the opening stages and Cardiff centre Patchell opened the scoring from 62 metres.
Warriors' early attacking play was undermined by a succession of knock-ons and Cardiff continued to dominate possession with the wind at their backs with Halfpenny doubling their lead with his second penalty attempt.
The momentum of the half shifted in the 25th minute when Tommy Seymour broke to put Cardiff on the back foot for the first time, however the move broke down with a forward pass.
But it sparked a spell of sustained pressure as Glasgow's forwards kept Cardiff on the rack inside their five-metre line. Twice Blues were penalised and Glasgow continued to scrum before Hobbs was sin-binned in the 32nd minute for another scrum offence that stopped Glasgow pushing over.
The visitors delayed the restart as they brought on prop Thomas Davies for winger Harry Robinson and Glasgow soon missed a glorious chance when Maitland dropped the ball on the try line.
Glasgow again won the scrum battle and Matawalu dived over a minute later but the try was disallowed for obstruction after the video referee ruled that Robert Harley had tackled a player off the ball.
A series of mistakes cost Glasgow momentum at the start of the second half - Ruaridh Jackson dropped the ball as Glasgow mounted an attack, Seymour lost the ball in his own 22 after calling a mark and Stuart Hogg passed into touch.
With Glasgow struggling to make inroads, they elected to kick a penalty from five metres away from both the touchline and 40-metre line but Jackson missed the target. Cardiff were looking comfortable with Patchell threatening to burst through before Halfpenny kicked a penalty from near the touchline in the 66th minute.
Glasgow immediately made four changes and stepped up a gear, kicking two penalties into touch in the Cardiff 22 in a bid to get back into the game, and they again saw their scrummaging pay off.
Cusiter directed play as Glasgow kept the pressure on and his reverse pass sent Grant over between the posts. Weir quickly converted.
Cardiff tried to kill the game near the halfway line but the Glasgow pack's ascendancy gave them a chance with two minutes left when the visitors were penalised for collapsing the scrum. However, Weir's attempt from near the halfway line was just off target.
- Sports & Recreation
- Leigh Halfpenny