Five months after a hip injury forced her to retire against Petkovic after one game of their third-round match at the Australian Open, Williams beat the German 7-5, 5-7, 6-3 in her first match back at Eastbourne to successfully open to her Wimbledon preparations.
"It felt fitting, I guess," Williams said of playing Petkovic again. "It was a great way to start it all off."
The 30-year-old Williams was clearly rusty. She began the match with two double-faults and made a series of unforced errors, particularly off the forehand side.
But the five-time Wimbledon champion won with her grass-court experience and aggressive play. She wasted three match points in the final game and saved a break point before finally clinching victory when Petkovic went wide with a forehand.
In other matches, third-seeded Victoria Azarenka beat Peng Shuai of China 6-4, 7-6 (2), while fifth-seeded Petra Kvitova recovered from a slow start to defeat Anastasija Sevastova of Latvia 5-7, 6-1, 6-3.
Williams said the blustery wind and damp air on England's southeast coast contributed to an erratic performance. She slipped on the baseline in the 11th game of the second set, almost doing a split.
"It was definitely an adventure today," she said. "Falling down every other point, coming back from such a long layoff, competing against someone who's been playing so well in the last 12 months.
"I was extremely excited to come back with the win. More than anything, I was just really extremely excited to have the opportunity to play another match."
Petkovic went on to reach the quarterfinals in Melbourne and has since risen to No. 11 in the rankings. The 23-year-old led 4-2 in the first set before losing it 7-5, but she fought back to rally from a break down to take the second.
"It's a victory to be healthy," said Williams, who added that she felt no pain from her hip during the match. "As long as I can stay healthy, I know my game will just keep improving every day."