Ulster brought the Blues' winning run to an end to move to the top of the Celtic League with a crucial victory at Ravenhill on Friday night.
Ulster (10) 26
Tries: Penalty, Wilson
Cons: Humphreys 2
Pens: Humphreys 4
Blues (12) 17
Try: J. Robinson
Pens: Macleod 4
The Irish province fell 9-0 behind to three Nick Macleod penalties but then got a penalty try to cut it to 9-7.
Centre Jamie Robinson went over for a 46th-minute try for the Welsh side, but penalties from David Humphreys had Ulster just ahead on 19-17.
Roger Wilson's try on 63 minutes was enough to see Mark McCall's men home.
Coach McCall was delighted to see his side battle from behind.
"Our three-week lay-off perhaps made it more difficult and we gave away early penalties," said McCall.
"But after 9-0 I thought we really came into the game and played fine rugby towards the end of the first half.
"We got our noses in front and stayed there in the second half with Roger getting a good try."
Ulster: B Cunningham; T Bowe, A Trimble, P Steinmetz, A Maxwell, D Humphreys, I Boss; B Young, R Best, S Best, J Harrison, M McCullough, N Best, S Ferris, R Wilson.
Replacements: N Brady, J Fitzpatrick, R Caldwell, N McMillan, K Campbell, P Wallace, J Bell.
Cardiff Blues: N Macleod; C Czekaj, J Robinson, M Stcherbina, C Morgan; N Robinson, M Phillips; J Yapp, T Rhys Thomas, G Jenkins, D Jones, R Sidoli, M Molitika, R Sowden-Taylor, X Rush (capt).
Replacements: B Evans, D Goodfield, K Schubert, M Lewis, R Powell, T Davies, D Hewitt.
Referee: Andy Murray (SRU)