However a try from prop Lloyd Fairbrother and a penalty try following a TMO decision from Jon Mason brought the Dragons well back into the contest to set up a frantic finish.
The Blues' win means the Dragons have now lost every one of their last 18 Welsh derbies, though Cardiff boss Danny Wilson says it was still an impressive win for his side.
"It is a tough venue and the Dragons have played well at home for a long time," Wilson told the BBC.
"There is a lot of chat about the Dragons developing and moving in the right direction.
"It was an ugly last 20 minutes, but to score three tries in these conditions and get the win was the important bit."