The victory, from pole position in a race that stayed dry despite the threat of rain, was the Briton’s second of the season, 64th of his career and third at the Circuit de Catalunya.
Finland’s Valtteri Bottas was second, a hefty 20.5 seconds behind, with Dutch 20-year-old Max Verstappen completing the podium for Red Bull and Vettel fourth.
Hamilton’s win followed on from the lucky victory that fell into his lap in Azerbaijan two weekends ago, but Sunday had nothing to do with chance and all to do with champions back to their best.
“This is more like it, let’s keep this up,” Hamilton told his celebrating team over the radio as he swept past the chequered flag.
“Today the car and myself, I felt that synergy which I hadn’t been feeling for the whole year,” he added in a pre-podium interview after parking up in pit lane. “It’s a good feeling.
“We’ve got our Mercedes board with us… so it’s great to have them all here and see that true force within the team, strength in depth, so I hope we can continue.”
Hamilton now has 95 points to Vettel’s 78 after five rounds of the 21-race championship.
Mercedes regained the lead in the constructors’ standings from Ferrari, who had 2007 world champion Kimi Raikkonen retire from the race.
Australian Daniel Ricciardo was fifth for Red Bull, ahead of Denmark’s Kevin Magnussen for Haas and Spaniards Carlos Sainz (Renault) and Fernando Alonso (eighth for McLaren).
Mexican Sergio Perez was ninth for Force India and Monegasque rookie Charles Leclerc took the final point for Sauber.
While Hamilton pulled away cleanly at the start, and Vettel passed Bottas into the first corner for second place, there was carnage behind as Romain Grosjean spun his Haas in a cloud of smoke.
The Frenchman then collected the Renault of Nico Hulkenberg and Pierre Gasly’s Toro Rosso in a major smash, fortunately without injury, that brought out the safety car for the first six laps.
When racing resumed Vettel was first of the leading group to pit but the Mercedes pair stayed out on what turned out to be a one-stop strategy, with Hamilton immediately smashing the lap record.
When Vettel made his second stop during a late virtual safety car period, after Esteban Ocon parked up his Force India by the side of the track, it backfired and he lost a place instead of gaining anything.
Verstappen, whose season has been littered with collisions, also nearly wrecked his race when he hit the rear of Canadian Lance Stroll’s Williams and lost a front wing end-plate.