Second seed Berrettini, who missed the clay-court swing after undergoing surgery on his hand in March, was playing in his first tournament since Indian Wells and triumphed after Murray had injury issues of his own in the decider.
Murray, who has had hip surgeries that nearly ended his career, was not moving well as the match wore on and though he saved a championship point, he was only delaying the inevitable as Berrettini sealed victory in two hours and 40 minutes.
“It feels unbelievable, [winning the title] was the last thing that I imagined when I came here,” Berrettini said.
“Coming back from an injury like that, from the first surgery in my life and then winning the tournament not even playing my best tennis in the first round, so it feels even more special.”
Berrettini broke early in the opener to take a 2-1 lead and he built on that on the back of a good service game — especially on his second serve — before sealing the set with a cross-court forehand winner.
Murray, who prevailed over Nick Kyrgios in an absorbing contest in the semi-final a day earlier, was not at his best and he groaned in frustration when the opening set slipped away from him in the final game.
The 35-year-old Scot improved in the second set, however, and after first denying Berrettini a break point to take a 5-4 lead, he took the set and forced a decider when the Italian hit a return long, letting out a roar in delight.
But just as he had seemed to find his groove, Murray was broken early in the third set and he needed to call on the physiotherapist twice to receive treatment on his hip court-side which restricted his movement.
“Congrats to Andy for the great tournament. This is not the way we wanted to finish the match, of course he’s hurt. You could see it and I’m sorry for him,” Berrettini added.
“He showed us so many times how to come back. I think I even learned a little bit from him, what he achieved in his career. For me it’s an honour to play against him in this kind of court.”
Murray congratulated Berrettini after the final and wished him well for Wimbledon.
“He’s just come back from a surgery and it’s never easy. He played extremely well today and deserved the win,” said Murray, who last won a title on grass at Wimbledon in 2016.
“Sorry I couldn’t get over the line today, but there’s been a lot of progress the last few weeks… Hopefully my body can hold up a little while longer so I can keep playing matches like this.”