The 25-year-old edged out his fellow Spaniard 7-6 7-5 to clinch his seventh title at the Real Club de Tenis Barcelona.
"Without doubt it was my most difficult match since the start of the clay season," he said. "I think that David more than deserved to win this title and I really wish him the best for the rest of his career.
"David always takes you to the limit and I really had some good fortune in that first set. When you have five set points against you and you save all of them obviously there is a good deal of luck involved.
"It was something of a lottery but it came down on my side and I am sorry for him but very happy."
The triumph was the 48th professional title of Nadal's career.