Sean Bentivoglio put the hosts ahead and he restored Cardiff's advantage after a Chris Higgins equaliser.
Jim Vandermeer levelled before Bentivoglio completed his hat-trick and Matthew Myers made it 4-2.
David Rutherford pulled one back but the Devils held on and the sides will meet again on Sunday in their final game of the regular season.
The Giants are nine points behind Cardiff and one point clear of third-placed Sheffield Steelers as the focus shifts to the play-offs.
The Devils have now secured the Erhardt Conference title.
Belfast Giants were edged out by Elite League champions Cardiff Devils in a top-two encounter on Saturday night.