Wilfried Zaha put the visitors ahead after only 12 minutes, with a first-time finish following a fine through ball from Eberechi Eze.
But Timothy Castagne equalised for the Foxes within five minutes of the second half by firing the ball into the roof of the net after being set up by Kelechi Iheanacho.
Palace nearly retook the lead but a superb sliding challenge from Jonny Evans denied Christian Benteke what would have been a tap-in into an unguarded goal.
That missed chance proved crucial as Iheanacho scored his 12th goal in nine games, when he cut inside on to his left foot and blasted the ball past goalkeeper Vicente Guaita for a late winner.
The result leaves the Foxes third in the Premier League, but takes them seven points clear of fifth-placed West Ham with five matches to go.
Leicester, who have also reached the FA Cup final for the first time since 1969, have only played in the European Cup or Champions League once, reaching the quarter-finals in 2016-17 after winning the Premier League the previous season.
Their run-in includes games against Manchester United in second, Chelsea in fourth and Tottenham in seventh.