Bottas, who lost part of his front wing, dropped to fifth after a late collision with Daniel Ricciardo, who overtook the Finn on the final lap in his second shot at the wounded Mercedes vehicle.
Lining up in fourth place on the grid, Vettel grabbed third from Raikkonen immediately but could not find a way past Bottas who slotted in behind Hamilton as a defence against the red threat.
Hamilton's win was the flawless way to finish the first part of the season but that doesn't obscure the fact that the title race could still go down to the wire.
"We could have only dreamt to be in the position that we are in now", Hamilton, who also won in Germany last weekend, said. We expected damage limitation, rather than taking the points. "What a lovely day and a great crowd - and a great job from the team".
Ferrari was favourite for the Hungarian GP as the circuit suits its auto better than Mercedes, but its two drivers were only able to salvage second and third late on when Valtteri Bottas's tyres faded.
Pierre Gasly finished sixth, while Kevin Magnussen, Fernando Alonso, Carlos Sainz, and Romain Grosjean rounded out the top 10.
"We were surprised he managed to hold Sebastian and Kimi behind for 25 or so laps and we knew the last five laps would be really critical".
Before the race, there had been a one minute silence, in hommage to the recently deceased President of Ferrari: Segio Marchionne.
They chose to start on ultra-soft tyres to maximise the grip off the line and minimise the chances of being jumped by the Ferraris, always quick starters, on the run to the first corner.
The twisty Hungaroring circuit, situated on the outskirts of Budapest, should have been the venue for a slam-dunk Vettel victory, given the track is not suited to Hamilton's Mercedes machinery. Next year, the Red Bull cars will race with Honda engines, abandonning Renault. Vettel was now only a couple of second off Bottas and only passed the Finn when the latter chose to pit on Lap 15, a lap after Raikkonen. He rejoined second between the German and Bottas.
The Englishman ruled from start-to-finish with a commanding performance to finish ahead of Sebastian Vettel, extending his lead to 24 points. Ferrari, as they expected, went for the more durable soft tyres for Vettel and made a decision to run long before their first stop and attack Hamilton at the end.
Vettel and Raikkonen drove well considering both endured a botched pit stop because of a slow tire change. Then Ferrari tried to set their trap. Hamilton pitted with a lead of over 6.0sec and fell back from Vettel initially, but then used his fresh soft tyres to close the gap to within 10sec before Vettel finally stopped with 31 laps to go.
Stoffel Vandoorne should have made it a double-points finish for McLaren but retired from ninth with a gearbox problem. By half race distance on lap 35 he was almost 25 seconds behind Vettel.
A virtual safety vehicle after McLaren's Stoffel Vandoorne retired briefly raised Ferrari hopes but no further drama unfolded until Vettel managed to overtake Bottas five laps from the end.