Ferrer broke Gonzalez in the ninth game of the second set, then served out to win the match.
"It was a difficult match," Ferrer said. "Fernando is a great player, one of the greatest in history. And as a person he is even better."
The 31-year-old Gonzalez has one more tournament left next month in Florida before he retires.
"The last tournament," Gonzalez said, pausing to reflect on the words. "I'm glad I'll have time to recover after all the running that David made me do."
Almagro is trying to win back-to-back events after taking the Brazil Open last week.
"I'm happy after having beaten a great player like Igor," Almagro said. "The second set was very tough."