Hamilton took off from pole position and stayed ahead of Rosberg – despite the German closing to less than a second in a tense final lap – to record a fourth consecutive victory and move ahead of his teammate in the overall standings.
Hamilton’s 100 points after five races put him three points ahead of Rosberg, who failed to find a way in front of his main rival for a fourth straight time after winning the season opener.
His 26th career win puts Hamilton one ahead of former world champions Niki Lauda, who now works for Mercedes, and Jim Clark.
Hamilton put himself on pace to add to his own title from 2008. He hadn’t led the championship since June 2012 after winning the Canadian GP with McLaren.
"This is our fourth one-two, it’s just unreal," Hamilton said after Rosberg helped douse him in champagne to celebrate his first victory at the Barcelona-Catalunya circuit.
"Getting my first win here after trying for eight years, it is difficult to put into words my feeling. I have never had a car like this. I have never had a gap like this. I am grateful I was able to keep (Rosberg) behind me."
Red Bull’s Daniel Ricciardo finished third for his first career podium after coming close on three occasions this year.
Four-time defending champion Sebastian Vettel had a flawless drive to move up from a 15th-place start to finish fourth, with his Red Bull finally not having any problems following two days of it stalling in practice and qualifying.
Valtteri Bottas of Williams crossed fifth, followed by struggling Ferrari pair Fernando Alonso and Kimi Raikkonen in sixth and seventh.
Lotus’ Romain Grosjean and Force India duo Sergio Perez and Nico Hulkenberg rounded out the points.
Not even a three-week break for their rivals to improve their cars prevented Mercedes from earning its fifth win in as many events this year in a disheartening display for the other 10 teams. Ricciardo ended up more than 48 seconds slower than Rosberg.
Mercedes increased its lead in the constructors championship race to 197 points. Red Bull was left in second with 84 points, with Ferrari trailing in third with 66.
After executing a clean start, the Silver Arrows focused on protecting their tires and preparing a final fight at the end of the race to decide which driver would leave the other as runner-up.
The two opted for different pit stop strategies, with Hamilton pitting first to change to a faster pair of medium tries before Rosberg went in to get a second set of slower, but more resistant, hard tires.
It appeared Rosberg’s tactics to then finish on his set of faster tires was going to pay off as Hamilton’s advantage evaporated, but Hamilton kept his nerves in check and his vehicle in front until the 66th and final lap.
Hamilton led all of the way, but he asked his team for help on several occasions – as well as complaining about the tire strategy – after never being able to shake Rosberg.
And although this race didn’t see any close calls between the drivers, as happened in Bahrain earlier this season, they were close right down to the last turn as Hamilton crossed 0.6 seconds ahead of Rosberg.
"I think if I had had one more lap I could have given it a go," Rosberg said. "I could have gone for a kamikaze move, but that wouldn’t have made sense. I will try to get that little extra bit and edge him out next time."
Only two cars failed to finish, Caterham’s Kamui Kobayashi and Jean-Eric Vergne of Toro Rosso.
Vergne retired during the 26th lap due to an exhaust problem. That put an end to an error-plagued weekend for Vergne, who was penalized 10 places when his wheel flew off in Friday’s practice. Earlier on Sunday, the vintage car that was supposed to ferry him through the pre-race drivers’ parade puttered to a stop, forcing Vergne to hitch a ride with Marussia’s Max Chilton and his chauffeur.