Williams, who before Tuesday had not played a competitive game since a Fed Cup appearance in February, was forced to come from behind to defeat world number 60 Pera 4-6, 6-4, 6-1 in two hours and 15 minutes at the Top Seed Tennis Club in Lexington.
“I haven’t played in so long,” Williams said afterwards. “It was good for me play three sets and win a match in three sets.”
The 38-year-old former world number one looked to be flirting with an early exit in the second set, but recovered from 0-40 down at 4-4 before holding and eventually winning the set to level.
“I wasn’t getting a good rhythm, and I just said ‘Serena, play like you’ve been practicing’,” Williams said.
“I knew I could play a little bit better if I just hung in there.”
Williams will now play either sister Venus or Victoria Azarenka, who face each other later Tuesday, in the second round.
Pera had seized an early advantage in the first set, breaking Williams to take a 3-2 lead before holding for the remainder of the set to win 6-4.
Williams was soon in trouble on her service game in the second set, falling 0-40 in the opening game before battling back to hold.
Williams moved into a 3-1 lead with a break of Pera’s serve in the fourth game, but her Croatia-born opponent hit back immediately with a break of her own before holding to level at 3-3.
With the next two games going to serve, Williams looked to be in trouble after falling 0-40 down in the ninth game. But she dug deep to hold for a 5-4 lead and then broke for the set when Pera sent a forehand return wide.
The momentum spilled into the deciding set, and another misdirected forehand from Pera handed Williams a break to move into a 3-1 lead.
Another break took her into a 5-1 lead and she closed out the win by holding to love, wrapping up victory with a cross-court forehand that left Pera stranded.
This week’s WTA tournament is the first to be staged in the United States since the COVID-19 pandemic shut down the tennis season earlier this year.