Former Tottenham defender Gardner netted for the first time in more than a year to spark jubilant scenes at Selhurst Park and leave Palace fans dreaming of their first semi success in four attempts.
Kenny Miller had an equaliser controversially disallowed for Cardiff, who will nevertheless need to show more cutting edge in the Welsh capital in two weeks' time if they are to turn the tie around.
Having stunned Manchester United at Old Trafford in the previous round, Palace will be confident of finishing the job and ending the semi-final heartache that has seen them lose at this stage of the competition three times since famously reaching the FA Cup final 22 years ago.
Whatever the outcome, the npower Championship is guaranteed at least one representative against either Manchester City or Liverpool next month.
Highly-rated defender Nathanial Clyne was the only virus-hit Palace player who failed to recover for tonight's clash, with Julian Speroni, Paddy McCarthy, Gardner and Mile Jedinak all back as manager Dougie Freedman made 10 changes from Saturday's FA Cup defeat at Derby.
Cardiff made the same number of changes from their own third round cup exit, with Kevin McNaughton fit to return along with the likes of Kenny Miller and Peter Whittingham.
The home fans appeared to be still basking in the glory of their United victory in what was a carnival atmosphere at a packed Selhurst.
The crowd soon turned hostile as Cardiff dominated the opening exchanges, with a controversial free-kick almost reaching Aron Gunnarsson via a deflection.
Speroni just managed to gather Joe Ralls' shot at the second attempt but moments later - completely against the run of play - Old Trafford hero Glenn Murray mistimed a free header from a corner.
Ben Turner nodded over a much more difficult chance from a corner at the other end as Cardiff continued to hold sway.
But Palace had more of a cutting edge and might have been ahead in the 27th minute had Kagisho Dikgacoi not shot too close to Tom Heaton after being teed up by Chris Martin.
Miller's curling cross sailed narrowly wide and Gardner also threw himself at a finish from the Scotland striker but Cardiff's raids were becoming more sporadic.
Ralls sent another finish just wide before Palace struck two minutes before the break.
Heaton tried to claim Darren Ambrose's free-kick but was beaten by Jedinak, whose flick-on was nodded into an empty net by Gardner, the unlikeliest of goalscorers.
Martin went close to inadvertently deflecting in Ambrose's shanked shot and Mike Dean rightly waved away handball appeals against Don Cowie as Palace began the second half strongly.
But Cardiff had a handball shout of their own snubbed and then saw what would have been an equaliser chalked off moments later.
Ralls' volley was deflected narrowly wide and Miller nodded the resulting corner into the net at the far post but Dean had already whistled, apparently for a foul on Speroni.
McNaughton limped off to be replaced by Darcy Blake in the 66th minute before Gardner flicked a header wide from another fine Ambrose free-kick.
The visitors threw on Stephen McPhail for Joe Mason four minutes later, with Ralls again sending a mid-range shot straight at Speroni before Palace introduced Sean Scannell for Martin.
Ralls was booked for a cynical trip on Ambrose as the midfielder threatened to extend a 25-yard surge but Palace were otherwise on the defensive as they sought to avoid a potentially damaging away goal.
They ran down the clock by bringing on Jermaine Easter for Wilfried Zaha after Whittingham went close with a deflected shot.
Stoppage time saw Andrew Taylor send a rising drive narrowly over the crossbar as Palace held on.