Leclerc looked set to increase his advantage over Verstappen in searing heat at the Circuit de Barcelona-Catalunya, but the Ferrari driver's race was over when he lost power while leading comfortably on lap 23.
Verstappen had been in the gravel on lap nine and also suffered DRS issues, but the Dutchman led a Red Bull one-two for his third consecutive win to move above Leclerc in the driver standings after Sergio Perez let him through under team orders on lap 49 of 66.
Leclerc got a good start from pole to retain his lead, but Hamilton's miserable start to the season was summed up when his he made contact with the Haas of Kevin Magnussen - who went into the gravel - at Turn 4 on the opening lap.
Hamilton limped to the pits with a front-left puncture and was told to continue after suggesting over the team radio that he retires from the race, having returned to the track in 19th place.
Sainz was back in 11th after spinning off at Turn 4 on lap seven and Verstappen was in the gravel at the same section of the circuit two laps later, dropping back from second to fourth.
Russell pitted from second and Verstappen was also called in on lap 14, with Leclerc leading comfortably after the first round of stops.
Verstappen was furious with his team as he was hampered by DRS issues attempting to pass Russell, who fended the Dutchman off to keep second place as they went wheel-to-wheel.
It was all going so well for Leclerc until he lost power with a win there for the taking and Perez soon passed Russell on fresher tyres to take the lead after Verstappen pitted for a new set of softs.
Verstappen was out in front on lap 38 after team-mate Perez and Russell pitted for mediums, then a quick stop for the defending champion put him back on track in a strong position but still behind his team-mate.
Perez, on a different tyre strategy, allowed Verstappen to pass him under team orders and there were no further twists at the front in a pulsating race, with a surging Hamilton passing Sainz to sit fourth until a late technical issue caused him to concede the place back.
Verstappen has wind in his sails after being blown off course
A victory for Verstappen looked unlikely when he found himself off the track, with his team stating that a strong gust of wind had led to his early spin.
It seemed like it would not be his day with the DRS not functionally properly, an issue his engineers had been working on ahead of the race.
Yet Verstappen ended the race as the championship leader for the first time this year. He now leads Leclerc by six points.
Frustration for Leclerc
For Leclerc, that is now back-to-races he has started on the grid and been unable to take the win. He has started on pole four times this season and won only two of those races.
Leclerc had to settle for second place in Miami last time out and this was a big setback from such a position of promise.
Hamilton run ends
Hamilton had won this race five times in a row, but finishing fifth was an achievement after he was forced into the pits on the opening lap.
The seven-time world champion had suggested over the radio that he could retire to give save his Silver Arrows' engine for another day, only to be told there were points up for grabs - and so it proved.
IN THE POINTS
1. Max Verstappen (Red Bull)
2. Sergio Perez (Red Bull) +13.072s
3 George Russell (Mercedes) +32.927s
4. Carlos Sainz (Ferrari) +45.208s
5. Lewis Hamilton (Mercedes) +54.534s
6. Valtteri Bottas (Alfa Romeo) +59.976s
7. Esteban Ocon (Alpine) +75.397s
8. Lando Norris (McLaren) +83.235s
9. Fernando Alonso (Alpine) +1 lap
10. Yuki Tsunoda (AlphaTauri) +1 lap
1. Max Verstappen (Red Bull) 110
2. Charles Leclerc (Ferrari) 104
3. Sergio Perez (Red Bull) 85
4. George Russell (Mercedes) 74
5. Carlos Sainz (Ferrari) 65
1. Ferrari 195
2. Red Bull 169
3. Mercedes 120
4. McLaren 50
5. Alfa Romeo 39
It will be off to Monte Carlo for the glamour of the Monaco Grand Prix next week.