The world number 17 issued a brief statement saying she could not continue after winning her first-round match.
"I love this tournament and I'm really sad that I have to withdraw," said the American, who was ranked 1,082 places ahead of the 18-year-old New Zealand wildcard who was playing her first WTA match.
Tournament director Karl Budge said she felt pain through the match in her right arm.
Lewis, a niece of 1983 Wimbledon finalist Chris Lewis, had two chances to serve for the first set at 5-4 and 6-5. She also held set point.
But the 36-year-old Williams shrugged off the pressure to break twice, take the tie-break 7-2 and cruise through the second set.
"The first match of the year is never perfect," Williams said after the match.
"But I'm happy to be into the next round and playing another teenager. I'm just feeling old."
Venus, seeded two, had been scheduled to play Japan's Naomi Osaka, 19, later Wednesday in her second-round match while her sister and number one seed Serena was due to face fellow American Madison Brengle.
Williams and Lewis were on serve at 2-2 in the first set Tuesday when rain forced the match to be held over. At the restart on Wednesday both players struggled to hold serve with six breaks in the first set.
The second set was more lop-sided although Lewis did manage one more service break when Williams was 5-1 up.