There was no stopping the rampant Williams as the two-time Cincinnati champion earned a second-round showdown with eighth seed and two-time Wimbledon victor Petra Kvitova.
Williams, a 23-time Grand Slam victor who returned to the tour this year after the birth of her first child, needed just 65 minutes to dispatch Gavrilova.
The 20-time major victor skipped Toronto last week to pace himself with the tournament at Flushing Meadows followed by the Laver Cup in Chicago in mid-September.
"I only lost four more points in the match than him", Murray said. "I just began. I just started - definitely at the very, very beginning".
Nadal, Roger Federer, Novak Djokovic and Andy Murray haven't played in the same tournament in more than a year.
Keys needed seven match points to close out the 3-6 7-6 (7/3) 6-4 win in two hours and 15 minutes.
Fifth seed Elina Svitolina faced an equally tough match against Svetlana Kuznetsova, with the Russian threatening Svitolina's lead in each set. I think that's the seventh match I've played.
Earlier in the day, three-time grand slam champion Murray was upstaged by French 16th seed Lucas Pouille in three sets.
"I just love talking about it because I feel like a lot of people have those same emotions and they don't have the same platform that I have". Instead of playing more grueling matches in Cincinnati, he'll take a week to get some rest and get ready for the U.S. Open. "I started the year very well". After surviving five match points, the British No 1 eventually succumbed 6-4, 7-5. Then obviously I hurt my elbow.
Murray was playing only his fourth tournament after missing almost a year out with a hip injury.
In other action, South Korean Chung Hyeon rallied to beat Jack Sock 2-6 6-1 6-2 and set up a second-round clash with Argentine fourth seed Juan Martin del Potro.
The Australian will next face Croatian Borna Coric, who beat Daniil Medvedev 6-2, 6-3.
Stan Wawrinka outlasted 12th seed Diego Schwartzman, ninth seed John Isner went down to Sam Querrey, Kei Nishikori was too good for Andrey Rublev, while Richard Gasquet was ousted by 13th seed Pablo Carreño Busta.