"Messi is a player who demands a lot from those who play alongside him because you must always pay attention. Sometimes it seems impossible that he has seen you and yet he has," he said in an interview published in Monday's edition of the newspaper El Pais.
"As of a result of that playing alongside him has helped me improve," added Viila, the top scorer in Spain's national team with 49 goals.
Messi has been the top scorer in the Champions League for the past three campaigns, in which time Barcelona have won the title twice and reached the semi-finals.
The 24-year-old won the World Player of the Year award in 2010 for the second year running.
He made his debut for Barca's first team in October 2004 and became the club's youngest league scorer when he netted against Albacete in May 2005 at the age of 17 years, 10 months and seven days.