The five-time champion brushed aside his French counterpart 6-3 6-3 6-1 in just shy of 90 minutes as a last-four collision with his compatriot now beckons.
Federer, who won the competition every year from 2004 until 2008, broke in the sixth game of the opening set to move 4-2 up, and refused to look back en route to drawing first blood in the match.
Another break in the third game of the second set helped the 34-year-old into a 3-1 lead, before another in the ninth saw the veteran earn a two-set lead in 66 minutes.
From there, Gasquet, who had only ever reached three Grand Slam semi-finals - one of which being at Flushing Meadows in 2013 - struggled as Federer went 3-0 up in the third set.
The Frenchman did hold serve to stop the rot, but it only delayed the inevitable as Federer closed out the win from there.
Wawrinka has never beaten Federer on hard surface from 11 attempts.