The eighth seed was due to face Cristian Garin in the first round but will now take no part after suffering with mild flu-like symptoms in the past few days.
Berrettini was the runner-up at SW19 last year and, after winning at Queen's for the second straight year last week, was considered to be among the favourites to go all the way at the All England Club.
But the Italian revealed his status on social media.
"I am heartbroken to announce that I need to withdraw from Wimbledon due to a positive COVID-19 test result," he wrote. "I have had flu symptoms and been isolating the last few days.
"Despite symptoms not being severe, I decided it was important to take another test this morning to protect the health and safety of my fellow competitors and everyone else involved in the tournament.
"I have no words to describe the extreme disappointed I feel. The dream is over for this year, but I will be back stronger. Thank you for the support."