© Getty Images
After a resilient start by the home side, Cardiff started to look the stronger of the two teams in the first half, but were hampered when Sam Hobbs was sent to the sin bin for a series of penalties in the scrum.
Glasgow thought that they had done enough to add the opening try of the match just before half time, but Niko Matawalu's dive over was ruled out for an illegal block in the build up.
Leigh Halfpenny added another penalty to put the visitors further ahead midway through the second half, but a strong spell resulted in a try from Ryan Grant, leaving the Warriors just two points down with nine minutes left to play.
The Scottish side had a couple of chances to clinch the win late on, but Duncan Weir kicked a 79th-minute penalty wide, before Cardiff held up a last-gasp scrum.