Also her first victory since turning 40, Williams looked impressive as she beat her Spanish opponent 6-3 6-4 in just under two hours.
She even earned a standing ovation when facing break point in the fourth game of the second set, as she worked hard to stay in the point before smashing a trademark forehand winner to save the game.
Williams, whose last grand slam title came in 2017 at the Australian Open, will face either number 12 seed Belinda Bencic or Tereza Martincova in the second round.
She is competing in the tournament as part of preparations for the US Open, and sealed her first win since splitting with coach Patrick Mouratoglou.
The duo had worked together for 10 years, before Mouratoglou revealed they had gone their separate ways in April after Williams decided not to compete at the French Open, with Mouratoglou moving on to train Simona Halep instead.
Williams returned to action after almost a year away from the game in the WTA event in Eastbourne in June in the women's doubles, before competing in the singles at Wimbledon, losing to Harmony Tan in an exciting first round contest on Centre Court at SW19
The 23-time grand slam champion has been named on the entry list for the US Open having pulled out of last year's tournament with a torn hamstring, entering with a protected ranking of 16.