Last weekend's Monte Carlo runner-up regained his accustomed position on an ATP winner's podium with his fourth title of 2013 and his third on clay for the year.
He rallied from two breaks down on a day of drizzle and heavy conditions, beating Almagro for the tenth time without defeat.
"I'm very happy," said Nadal. "This has been an important week for me. To win here again is a great joy after everything I've been through.
"It was a fantastic match for me," he told a crowd which had huddled under umbrellas for the duration of the contest. "Thanks to the people who watched us."
The world number five has made a storming comeback to tennis after missing seven months from last summer with knee injuries. Since his February return, he has played finals in all six events he has entered.
"I've played just six tournaments this year but have been in the finals of all of them," said the satisfied winner, who moves up to second in the season points race behind Novak Djokovic, according to ATP calculations. "I'm in the top 10 and I'm getting my tennis back."
Nadal went into recovery mode after trailing Almagro 0-3 in less than a quarter hour on the heavy court.
But as quickly as he had temporarily let his guard down, Nadal was able to muster his resources to fight back.
He claimed an epic ninth game for a 5-4 lead before serving out the opening set a game later as Almagro couldn't reach a forehand to the corner.
"It was cold and rainy today and I was not aggressive enough at the start," said Nadal. "It was important to get a break-back (when) down 3-0."
The second seed sped away with the second set in the testing conditions and finished off the victory with an overhead smash.
"I'm used to losing to Rafa," said Almagro. "But matches like this are what makes you a better player.
"I started well but after it really started to rain the balls got heavy and Rafa found his game in the conditions."
Nadal becomes the first man this season to win four ATP titles, adding Barcelona to those he lifted in Brazil, Mexico and California.
The 26-year-old who is rediscovering the form that habitually makes him the favourite when the French Open comes around in May.
This victory took his Barcelona win streak to 39 matches.
In clay finals, the impeccable Spaniard has lost only to Djokovic (three times), Roger Federer (twice) and Horacio Zeballos (once). He now stands 40-1 in Barcelona.
The win was the second of the season for Nadal over Almagro after beating his countryman in the Acapulco semi-final.
Nadal will now prepare for another home event, the Madrid Masters, beginning next weekend.