Having signed for Barça in a €40m ($51.5m USD) 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.1m.
"FC Barcelona and Atletico de Madrid have reached an agreement in principle for the transfer of the player David Villa to the Madrid club," Barcelona said in a statement.
"The operation will cost a maximum of €5.1m, made up of €2.1m this season, two 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 per cent 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.