Del Potro, who had not dropped a set all week, was unable to hold serve once in the first set as the Spaniard fought his way to a 6-1, 4-6, 7-5 win.
Fifth-seed Bautista Agut, who won the title in 2016, outlasted second-seed del Potro, the 2009 champion, in a match of remarkable highs and lows.
Del Potro struck in the first game to break but was forced to repeat the feat in the seventh game after Ferrer had levelled matters at 3-3.
After an entertaining final set, Bautista Agut broke for 6-5 and had to save a break point as he served out the match.More news: Trump Lawyer Cohen Sues Buzzfeed Over Claims in Russia Dossier
More news: Aamir Khan Reviews Saif Ali Khan's Kaalakaandi. His Verdict Here
More news: Chris Brown's monkey seized by wildlife agents
"I'm exhausted", Del Potro said in a court-side interview.
Del Potro had advanced to the final behind his booming forehand that nullified the superb defensive game of David Ferrer.
"I have many good things to celebrate - of course, when you lose in a final, it's not happiness, but the tennis life continues".
Earlier, fifth seed Bautista Agut outlasted Dutchman Robin Haase in an epic clash that took nearly three hours before the Spaniard produced an audacious backhand lob that kissed the baseline to clinch the 6-7 (7) 7-6 (3) 7-6 (5) win. "Juan Martin is a great champion, he's very tough to beat, and I played two incredible games in the last two games of the match".
"It was an unbelievable match today", said Bautista Agut, who was presented with a ceremonial "taiaha", or Maori wooden staff. He moved so much better than me from the baseline. I think the crowd enjoyed the game. "You never know what will happen but I took my chances and got through". He again saved a break point before winning the set in 50 minutes.