The American, 37, was set to play sister Venus Williams in the second round but said she would be "concentrating on rehab" now.
"I look forward to seeing you all at the French Open and next year in Rome," she added.
Williams has also struggled with injury - pulling out of the Miami Open at the third-round stage in March, after a viral illness prevented her from competing in Indian Wells.
Former world number one Caroline Wozniacki also pulled out in Italy.
Wozniacki, 28, withdrew from her first-round match against American Danielle Collins because of a leg injury, having lost the first set 7-6 (7-5).
It is the second straight tournament at which the Dane has been forced to retire early on.
She trailed 3-0 against Alize Cornet in the opening round of the Madrid Open earlier this month before pulling out with a back injury.
American Collins, 25, will now play two-time Grand Slam winner Garbine Muguruza of Spain in the second round of the Italian Open on Wednesday following Wozniacki's withdrawal.
"Obviously, I feel for Caroline, what she's going through with her injuries," said Collins.
"It's never fun to go out there and play against somebody that's hurt, and dealing with that kind of pain. I was happy with the way I played, but it's just not a fun situation."
The French Open tournament kicks off on 26 May and Williams is chasing her fourth title, while Wozniacki, a former Australian Open champion, has never gone beyond the quarter-final stage. [ credit: BBC]