Having signed for Barca in a €40 million ($51.5 million) deal from Valencia in 2010, the 31-year-old, who struggled to hold down a regular first team place at the Camp Nou last season, will cost Atletico just €5.1 million.
"FC Barcelona and Atletico de Madrid have reached an agreement in principle for the transfer of the player David Villa to the Madrid club," said Barca in a statement.
"The operation will cost a maximum of €5.1 million, made up of €2.1 million this season, €2 million more if the player remains at Atletico in 2014/15 and another million if he extends his contract until 2015/16.
"In the meantime Barcelona retain the rights to 50 percent of any future transfer of the player."
Villa will henceforth fill the void left by Colombian striker Radamel Falcao's transfer from Atletico to Monaco.
Villa began his career at Sporting Gijon before moving on to Real Zaragoza and then Valencia in 2005.
He scored 108 goals in 166 league games for Valencia, becoming one of the hottest strikers in Spanish football.