The Swiss ace had the upper hand in the contest from the outset and showed why he was deemed the favourite for the tournament with a host of delightful winners that helped secure his place in the last 16.
A moment of controversy in the match came midway through the second set, when the umpire communicated to the players that the Hawk-Eye system was down - meaning there could be no challenges until it was back up and running.
Gasquet obviously did not take the news lightly and lost his head somewhat, allowing the Swiss to strengthen his foothold in the game.
Hawk-Eye returned with Gasquet on serve, trying to take the set to a tie-break at 5-6. However, Federer used his experience to force a break and take a 2-0 lead as a frustrated Gasquet squandered three challenges.
The third set went by with few talking points, with Federer taking a 3-0 lead with an early break and carrying on from there. Gasquet broke back but was unable to take advantage of the opportunity.
Federer will take on Marton Fucsovics in the fourth round. The unseeded 25-year-old beat Argentine Nicolas Kicker 6-3 6-3 6-2 to earn his spot opposite the all-time great.
"What was the difference between us? My head's still spinning from the match point when I got so lucky. I was able to stay a bit more on the offensive than maybe he was, and maybe protecting my own serve a little bit better than him. The match was close. You focus to the very end," Federer said after the match.
"Expectations are different this year. I'm coming in this year very fit, very well equipped, knowing that five sets are not an issue. The [Tomas] Berdych match [in the third round last year] was really key to showing myself that I can play a great match and maybe I can do it again and again. I don't know if that's how it's going to happen this year, but so far so good."
Novak Djokovic qualified for the round of 16 by defeating Albert Ramos Vinolas in straight sets 6-2 6-3 6-3. It was a comfortable match for the Serb, who made easy work of his opponent.
The 30-year-old survived an injury scare having taken the first set in 41 minutes and looked relatively comfortable but put the crowd and his coaching staff in a state of panic as he called the trainer to look at a problem which appeared to originate in his lower back.
However, he recovered soon afterwards and took the attack to Ramos Vinolas, who struggled for a foothold and eventually folded. The only concern for Djokovic was the 40 unforced errors in his game, which may prove costly in the later stages of the tournament.
Djokovic will now take on Hyeon Chung, who pulled off the biggest upset of the day with a five-set victory over fourth seed Alexander Zverev.
The German had taken a 2-1 lead at the end of the third set and was looking relatively comfortable but completely lost his way as Chung staged a magnificent comeback to win 5-7 7-6 2-6 6-3 6-0.
Elsewhere on day six, women's world number one Simona Halep and unseeded American Lauren Davis played out a thrilling 28-game final set in a match that took almost four hours to complete. Halep eventually forced a match point and took it for a 4-6, 6-4, 15-13 victory.
The final set lasted for two hours and 22 minutes, while the 48 games in the entire match equalled the most for a women's encounter in Australian Open history, tying the 1996 quarter-final between Chanda Rubin and Arantxa Sanchez Vicario, which Rubin won 6-4, 2-6, 16-14.
Meanwhile, Angelique Kerber continued her march towards a second Australian Open crown with a clinical third-round victory over five-time Grand Slam winner Maria Sharapova. The 2016 champion cruised to a 6-1 6-3 victory in an hour and four minutes at Rod Laver Arena.
Men's 19th seed Berdych overcame Juan Martin del Potro in straight sets 6-3 6-3 6-2. The 32-year-old was in complete command from the opening game and will be looking to make a name for himself by progressing further into the competition.