The forward's late winner – his 14th goal in 14 games – clinched a 2-1 victory to leave the Foxes three wins away from booking a top-four spot.
They moved seven points clear of fifth-placed West Ham with five games remaining and tantalisingly close to Europe's top table.
Inconsistent Palace, with no immediate threat of relegation, gave the Foxes a fright but are destined to finish in mid-table.
The former England striker was also thwarted by Cheikhou Kouyate and fired over inside the first 10 minutes and would have been encouraged by the ease with which he found space.
Yet the Foxes found themselves behind from Palace's first attack after 12 minutes.
Christian Benteke left Youri Tielemans in a heap in midfield and Leicester were suddenly exposed. Ebere Eze's inch-perfect pass slipped Zaha in and the forward beat Kasper Schmeichel for his 10th top-flight goal of the season.
A home defeat to Palace was not in Leicester's script as they aim to return to the Champions League after a four-year absence but the early gaps in the Eagles' defence disappeared.
Palace closed ranks and dished out some thunderous challenges, especially on James Maddison and Iheanacho.
Caglar Soyuncu lashed over but Leicester were out of sync, missing the spark which has kept them in the top four all season, and Maddison's shot which went for a throw summed up their struggles.
They reached the break behind but their recovery began after just five minutes of the second half.
Tielemans' ball found Iheanacho and he held off Kouyate to tee up Castagne, who fired in high past Guaita from 10 yards.
Yet the Foxes needed Jonny Evans to keep them level just six minutes later.
Zaha put Jairo Riedewald clean through and he drew Schmeichel before passing across to Benteke – only for Evans' brilliant last-ditch tackle to deny the striker a tap-in.
Leicester, though, began to regain some swagger and Maddison and Vardy shot at Guaita, while Vardy's celebrations were quickly cut short by an offside flag after he turned in with 20 minutes left.
Just before, Benteke headed Eze's corner straight at Schmeichel but Vardy went closer to a winner 13 minutes from time when he swapped passes with Iheanacho and fired across goal.
Tielemans shot wide but Leicester finally got the winner they had threatened with 10 minutes left.