The home side did open the scoring, however, five minutes before the break after a mix-up in the Cardiff defence.
Jedinak sent in a teasing cross and with Heaton caught under the ball, Gardner rose highest to head Palace into a half-time lead.
Palace had a penalty appeal turned down after 53 minutes when the ball appeared to strike Don Cowie on the hand, but no decision was forthcoming.
Cardiff were a whisker away from bringing the tie level after 56 minutes but Ralls's effort drifted just wide of the post.
It was the Welsh side who continued to look the most likely in the second period but their attacking flair created holes in their defence, something which the home side could not exploit.
Ralls again went close for Cardiff after 79 minutes but his effort drifted high and wide.
The Palace defence remained strong, however, despite late Cardiff pressure, to hold on to a vital first-leg victory.
Palace return to domestic action against Leeds on Saturday, while Cardiff travel to Doncaster.