Last week's surprise win over Roma had brought the Rosanero within three points of 17th place towards the end of a joyless season spent almost entirely in the bottom three and Steve Von Bergen's first-half opener lifted spirits even further on Sunday.
Gianni Munari's swift equaliser was forgotten almost immediately as Ilicic scored an unforgettable goal on the end of a dazzling run that Samp would never respond to.
Santiago Garcia then made all three points safe to draw Palermo level on 27 points with Siena and Genoa, who visit Napoli on Sunday, with seven games remaining.
Ilicic and Daniele Gastaldello exchanged unconvincing shots at either end before Palermo got serious with a daisy-cutter from Jasmin Kurtic.
Sergio Romero got down to block that effort and minutes later Rosanero keeper Francesco Benussi picked the right moment to sweep the ball off Munari's feet.
The Sicilians went dangerously close in the 23rd minute, Fabrizio Miccoli testing Romero with a searing left-footed drive thanks to good service from Ilicic.
Mauro Icardi chose to shoot down Benussi's throat on the half-hour mark and, five minutes later, Palermo took the lead.
Romero failed to cope with Miccoli's free-kick and Von Bergen nicked in to beat Marcelo Estigarribia to the ball to score his first goal in Italian football.
But as has happened so often this term, Palermo wobbled immediately and Samp duly equalised two minutes before the break.
Munari had been thwarted by Benussi in the early exchanges but there was no stopping him as he outjumped Kurtic to head home from a corner.
The gauntlet had been thrown down to Palermo and they responded in sensational fashion as play resumed.
Ilicic's dribble resembled the best of moves from either Diego Maradona or Lionel Messi as he tricked his way past four men, dummying his shot with both feet before sending the ball across Romero with the deftest of flicks.
The visitors soon took a two-goal lead with Samp stunned into submission.
When Romero was found rooted to his spot in the 56th minute, Garcia shrugged off Andrea Costa's challenge to convert.
Palermo's momentum was terrifying and Miccoli came within inches of a fourth goal only for Romero to close him down and send the ball wide.
There was no containing Ilicic, however, and only the Slovenian's speed saved Samp when he repeated his earlier burst into the box only to stumble and trip at the crucial moment.
Arevalo Rios came to the fore with Samp still dazzled. The Uruguayan blasted a sweet volley over the bar before testing Romero from the middle of the box.
At the final whistle Palermo had not only won a league game on the road for the first time since last April, but Giuseppe Sannino's men were finally allowing themselves to consider spending a 10th straight season in the top flight.