The 30-year-old Villa suffered the injury during the first half of Thursday's Club World Cup semi-final victory over Al-Sadd in Japan.
Barca announced last week that Villa, who returned to Spain on Friday, was likely to be absent for up to five months, and that timescale remained the same following his operation today.
A statement on the Barca website read: "David Villa has had his broken left tibia operated on this afternoon by Dr Ramon Cugat and Dr Ricard Pruna.
"The player will remain in hospital for three or four days and the recovery time will be between four and five months."
That means Spain's all-time record scorer is likely to miss the majority of Barca's La Liga and Champions League campaigns but could yet be fit for Euro 2012.