The 34-year-old Basel native, winner of a men's record 17 Grand Slam titles and five US Open crowns, has not dropped a set so far in the Flushing Meadows fortnight.
World number two Federer, a runner-up to top-ranked Novak Djokovic at Wimbledon two months ago, could have a chance for revenge in a US Open final rematch if form holds into Sunday's championship match.
Federer has dominated the rivalry with 12th-seeded Wimbledon semi-finalist Gasquet, winning 14 of their 16 meetings, including the past six matches in a row and all eight contests on hard courts.
“I'm not sure if I've seen Gasquet play as well as well as he has right now,” Federer said.
“I like the way he played at Wimbledon — he has a good attitude,” he said.
“He was fighting. Good shot selection. I'm sure he gained confidence from Wimbledon. That's why I expect it to be tougher against him than in previous times.
“I feel like this could be one of the tougher Gasquets I've played, so I expect it to be difficult.”
Switzerland's number two contender, reigning French Open chamption Wawrinka, will face South African 15th seed Kevin Anderson in the other men's quarterfinal at Arthur Ashe Stadium, with a semifinal berth against Federer or Gasquet at stake.
Defending champion Marin Cilic, the ninth seed from Croatia, will face Djokovic in the other Friday semifinal.
Fifth seed Wawrinka is 3-4 against Anderson, having lost his past four meetings with the big-serving Johannesburg native, who upset British third seed Andy Murray to reach his first Slam quarterfinal after going 0-7 in the last 16 before shocking the Scotsman.
After ending his Open Era-futility record for reaching the quarterfinals, Anderson became the first South African in the US Open last eight since Wayne Ferreira in 1992.
The last South African in a US Open semi-final was Johan Kriek in 1980.
Wawrinka, 4-6 in Slam quarterfinals, has not played any top-50 foe at the Open until now.
The 2014 Australian Open champion, who was pushed to four sets by American Donald Young in the fourth round, had run the most distance of any quarterfinalist in the tournament.
“It's good. I'm losing weight,” Wawrinka said.
“Doesn't affect anything. I feel really fresh. I don't mind at all.”