Bautista Agut raced to a 6-1 win in the first set and broke serve to lead 1-0 in the second when Sock, who had been struggling with the flu for two days, pulled out.
The 23-year-old American, who had difficulty chasing any ball more than a racket-length away, received medical attention at the end of the first set.
He insisted on carrying on, but after losing his serve for the third time immediately after the resumption, Sock decided his final was over.
The win for Bautista Agut, his third on the ATP tour, completed a remarkable week for the eighth seed.
The 27-year-old beat defending champion Jiri Vesely in the second round and 2014 champion John Isner in the quarter-finals.
In the semi-finals he was on the brink of being eliminated when Jo-Wilfried Tsonga held match-point in the second set, before finding another gear to battle back and win in three sets.
“I feel so happy,” Bautista Agut said. “I had an amazing week. I had plenty of good wins, played wonderful tennis here. I feel sorry for Jack.”
Sock was also unwell in the semi-finals when he came from a set down to beat top seed David Ferrer and joked then that perhaps the illness was good for him.
But he had no energy in the final and the match was over in 24 minutes.
“I’m sorry I couldn’t finish the match, but I wanted to come out and at least attempt, like yesterday you never know what might happen,” he said.
Bautista Agut and Sock are now 2-2 in head-to-head matches.