The 31-year-old Spain international will undergo an operation to treat the condition, Barca said in a statement on their website.
Villa is still working his way back from a broken leg he sustained at the Club World Cup in December 2011.
He has scored five goals in 15 league appearances this season and five in the King's Cup but has yet to open his account in the Champions League.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try your first month for just £1 / $1 / €1
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.