The Italians arrived in Spain with a 4-1 aggregate lead from the first leg of their last-16 tie and quickly added to their advantage inside an empty Mestalla Stadium.
And while Kevin Gameiro capitalised on a defensive mix-up to tap in an equaliser for the hosts, Diakhaby's handball allowed Ilicic to score his second spot-kick of the evening to put the visitors 6-2 up on aggregate.
A second Gameiro goal, this time from a close-range header, levelled the score on the night before Ferran Torres' lobbed effort put the La Liga side in front.
However, Ilicic's rasping left-foot drive from 20 yards restored Atalanta's three-goal aggregate lead as he became the first Slovenian player to score a Champions League hat-trick.
Ilicic's fourth, a left-foot effort into the top left corner, rounded off an 8-4 aggregate win on a fine evening for Gian Piero Gasperini's side, who have now scored 28 goals in their last seven games and become the competition's first debutants to reach the last eight since Leicester City in 2016-17.