Williams, 37, has not played since a hard-fought three-set win over Petersen in the second round at the Miami Open in March before withdrawing with a knee injury.
The 23-time Grand Slam winner — now ranked 11th — also withdrew from Indian Wells in March complaining through illness.
Watched by her husband Alexis Ohanian, Williams doubled faulted on her first match point but sealed victory on her second against her 58th-ranked opponent.
A four-time Rome winner Williams last won on the red clay of at the Foro Italico in 2016.
She will play either her older sister Venus, who received a wild card entry to the tournament she won in 1999, or Belgian Elise Mertens in the second round.
Should Serena and Venus meet in Rome, it will be their first meeting on European clay in nearly 17 years.
Their last meeting on red clay came at the 2002 Roland Garros final.
Serena Williams is preparing for the French Open later this month where she could match Margaret Court's record of major singles titles.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ