The 285th-ranked Zverev, who was playing in his hometown tournament, upset Robin Haase, fifth-seeded Mikhail Youzhny, and 11th-seeded Santiago Giraldo in becoming the first 17-year-old to reach an ATP semifinal since 2006.
However, Ferrer saved both break points he faced and converted five of his seven chances to win in less than an hour.
Mayer did not drop a set in five matches on his way to the final. The Argentine is bidding for his first ATP title after losing in his maiden final to Fabio Fognini at Vina del Mar in February.
Also in February, Ferrer defeated Fognini in Buenos Aires for his third straight title, the Spaniard's 21st overall.