The 20-year-old joined the Premier League outfit in 2015 but has not made a senior appearance for the club.
He has spent time out on loan at Genk, NAC Breda and FC Twente, with his performances for the latter particularly impressing.
He scored 18 goals in 32 Eredivisie appearances for the Dutch side as well as laying on a further four strikes.
City have insisted a buy-back clause be included within the deal, though that will only run until 2020.
Villarreal finished fifth in La Liga last season, and Unal will likely battle with Cedric Bakuambu and Roberto Soldado for a place in the starting XI.
Unal's departure will mark him as the sixth player to depart the club this summer, with Bacary Sagna, Pablo Zabaleta, Gael Clichy, Willy Caballero and Jesus Navas having all been released.
Manager Pep Guardiola is overseeing an overhaul of his squad following a trophyless campaign, with goalkeeper Ederson set to be confirmed as the club's second signing of the off-season following the arrival of Bernardo Silva last week.