The second-seeded Spaniard was in cruise control as he took the first set behind some superb serving and stout defence but the big-hitting Croatian battled back to snatch the second.
That was as good as it would get for Cilic, however, the momentum shifting decisively in Nadal's favour when he jumped in the air to hit a spectacular overhead smash that electrified the crowd.
Cilic would double fault later in the game to give Nadal a 3-1 lead and he would never threaten again on a hot and humid night in New York, with Tiger Woods among the star-studded crowd at Arthur Ashe Stadium cheering on the Spaniard.
Nadal fired a forehand winner on match point to seal the victory and make his 40th quarter-final at a Grand Slam event.
"For some moments in the second set I felt there was too many points in his hands," said Nadal.
"He was pushing me back ... after (the) second set I thought something needed to change."
The 33-year-old has had a relatively stress-free time at the tournament so far, dropping just one set and getting a walkover in the second round.
Next up for the 18-time Grand Slam champion is a meeting with Argentine Diego Schwartzman, who toppled Alexander Zverev in their round of 16 clash earlier in the day.
Nadal is on a collision course with third seed Roger Federer and could meet his old rival in Sunday's final if both players advance. Federer faces Grigor Dimitrov in the quarters on Tuesday.