Hamilton hustled Leclerc during a remarkable spell of wheel-to-wheel action at Monza – but the young Monegasque excelled to keep the world champion at bay and register his second win in as many weeks and Ferrari's first on home soil in nine years.
With 11 laps remaining, Hamilton then made a mistake at the first corner in his pursuit of Leclerc, falling off the road and allowing Bottas to take second.
On fresher tyres, Bottas took over from Hamilton in his pursuit of Leclerc but crossed the line just eight-tenths shy of the Ferrari star.
In contrast to Leclerc's heroics at the Cathedral of Speed, Sebastian Vettel endured yet another torrid afternoon in the sister Ferrari.
The four-time world champion took the chequered flag a dismal 13th and one lap down after a spin at the Ascari chicane on lap six.
Vettel had to stop for a new front wing after he clumsily collided with Lance Stroll in his attempt to rejoin the track following his mistake. He was hit with a 10-second stop-and-go penalty for his part in the incident.
Hamilton's late error allowed Bottas to reduce the championship deficit to 63 points with seven rounds left.
"What a race," said Leclerc. "I have never been so tired. I made a few mistakes, but in the end I finished first so I am very happy."
"Charles did a great job," said Hamilton. "He came under a lot of pressure from Valtteri and I.
"I did the best I could, but following so closely for so many laps, the tyres just went off the cliff. It was not our day."
Leclerc's credentials were tested to the absolute limit as Hamilton hunted the 21-year-old around the high-speed Monza track.
Leclerc was shown a black-and-white flag, Formula One's version of a yellow card, after Hamilton claimed he was pushed off the road by the Ferrari driver.
On lap 23, Hamilton launched an attack on Leclerc at the second chicane, but was forced to take to the run-off area.
"He didn't leave me a car's width," said Hamilton on the radio. "He pushed me off."
Thirteen laps later, Leclerc then ran over the kerbs at the first chicane but rejoined in front of Hamilton.
"There is some dangerous driving going on," said Hamilton. The stewards noted the incident but took no further action.
The partisan Ferrari fans stood on their feet to applaud Leclerc as he whistled past on the main straight, and they burst into unanimous cheers when Hamilton was forced to take to the escape road after going too hot on his brakes at the first corner.
Bottas took over second position as Hamilton stopped for a set of fresh tyres, claiming a bonus point for the fastest lap of the race in the closing stages.
Bottas lined up a move on Leclerc for the win with just two laps to run, but the Finn locked up, affording Leclerc much-needed breathing space.
The Renault duo of Daniel Ricciardo and Nico Hulkenberg finished fourth and fifth ahead of Red Bull's Alex Albon.