Pole-sitter Hamilton lost the lead to Vettel at the start only to regain the lead from the Ferrari driver in the final stages of a compelling race to seal his second victory of the year.
The Mercedes driver's 55th career win was hard-fought and tense, with Ferrari's Vettel seizing the lead from Hamilton at the start and in the hunt all the way as the tyre strategies played out.
Ferrari were the first to blink as Vettel came in for his first stop at the end of lap 14.
Hamilton's second win in five races this season cut Vettel's lead from 13 points to six heading into the Monaco GP.
On an afternoon that saw the two multiple world champions in a battle of their own with the rest so far behind they might as well have been in another race, Daniel Ricciardo finished 75.8 seconds behind the victor.
Vettel was second and Red Bull's Daniel Ricciardo third.
Hamilton had vowed to take inspiration from Bottas' lightning quick start in Russian Federation a fortnight ago, but it was Vettel who was fastest out of the blocks here.
Bottas retired 38 laps later, having started with an engine that had already done four races and was hurriedly shoe-horned into the auto overnight on Friday after a water leak was discovered. Both Raikkonen and Verstappen suffered race-ending suspension damage but the carnage continued behind as Felipe Massa collided with Fernando Alonso, forcing the McLaren into the gravel between Turns 2 and 3. The team, the only outfit to finish with two cars in the points at every race so far, are now 34 points clear of their midfield rivals in fourth in the Constructors' Championship.
At the start, Vettel had made a sensational getaway from second on the grid to move ahead of Hamilton into Turn 1.
"It was a hard race", admitted Hamilton.
Benedict Cumberbatch, Jake Gyllenhaal to work together?
Cumberbatch next reprises his Dr Stephen Strange role for Disney/Marvel's Thor: Ragnarok , followed by Avengers: Infinity War . Gyllenhaal recently wrapped production on Paul Dano's directorial debut, " Wildlife ", opposite Carey Mulligan.
"I looked down and I had lost an very bad lot of time". "It's draining, fast cars, he (Vettel) drove fantastically well and it's a real privilege to race against such an awesome driver".
But after labelling the German's tactics "dangerous", Hamilton got his own back just a matter of laps later when he charged past Vettel like a steam train on the 220mph drag down to the opening turn.
Before he broke down, Bottas gave Hamilton some critical help by holding Vettel up through a thrilling lap-long duel.
Interviews with the top three drivers following Lewis Hamilton's win in the Spanish Grand Prix.
Vettel now has 104 points to Hamilton's 98.
Wiping out the Briton's deficit, Hamilton came out into the path of the oncoming Ferrari and, as he attempted to overtake around the outside, Vettel held the line and the Mercedes took to the run-off area.
"If we had had the same tires on, it probably wouldn't have been as exciting" Hamilton said.
After being edged into second place during a contest that delighted the crowd in Catalonia, Vettel said: "I was pushing".
Carlos Sainz Jr, who was pitched onto the grass when he went side-by-side with Kevin Magnussen as they exited the pits, was classified as seventh. I think it's the third longest run or something down into Turn One here so, of course, it's going to be important to get a good start. "But it was close, it was cool".
- Global Cyber Attack Hits Hospitals, Companies
- US, China Cooperation to Extend Trade
- 10 arrested after blocking entrance of Louisville abortion clinic
- Ginnifer Goodwin, Josh Dallas, Jared Gilmore, and Emilie de Ravin Also Out
- Portugal wins Eurovision for the first time
- Leaders condemn latest North Korea missile
- Venezuela hopes no country hinders China's 'fantastic' Silk Road initiative
- President Trump warns Comey about 'leaking', implies talks were recorded
- La vie en chansons de Salvador Sobral, le gagnant portugais — Eurovision
- President Trump, "The War on Americans Gun Rights is Over"