Gasquet, the veteran Frenchman, had announced he would retire after his 22nd Roland Garros campaign, and would have needed to pull off a major shock to prolong his last tournament.
There was to be no fairytale in Paris for the 38-year-old, who bowed out with one final flourish of that inimitable one-handed backhand in a 6-3 6-0 6-4 defeat.
Sinner is bidding for the second part of a potential calendar-year grand slam and to become the first Italian men's champion since 1976.
But the 23-year-old knew this was Gasquet's day, and said: "Congrats for everything you have done, an amazing career, but most importantly an amazing person."
Gasquet, received a standing ovation and an honorary trophy during a post-match ceremony on Court Philippe-Chatrier, said: "I couldn't dream of a better ending than having my last match on this court. I will keep loving tennis until the end of my life."
Third seed Alexander Zverev, last year's runner-up, dropped the first set against Dutchman Jesper De Jong but hit back to win 3-6 6-1 6-2 6-3.
"It wasn't the best set of tennis, the first," Zverev said in a post-match interview. "I am still having chances not playing great. Once I found my rhythm I felt very comfortable."
"I am happy about my level. He played a fantastic match also. I hope I can continue playing great tennis and we will see what I can achieve."
French 14th seed Arthur Fils came through a dramatic four-and-a-half-hour marathon against Spain's Jaime Munar.
The 20-year-old needed treatment for a back injury during the third set and could barely move in the fourth, but the painkillers kicked in just in time for him to complete a 7-6 (7-3) 7-6 (7-4) 2-6 0-6 6-4 win.
Portuguese qualifier Henrique Rocha, ranked 200th in the world, staged a memorable comeback to beat 19th seed Jakob Mensik 2-6 1-6 6-4 6-3 6-3.
Rocha, who is playing in a Grand Slam's main draw for the first time, will face Alex de Minaur's conqueror, Alexander Bublik, in the third round.