Hamilton triumphed after Ferrari’s impressive Monegasque new boy was deprived of a maiden victory by power failure after leading with 10 laps remaining.
The five-time world champion said Ferrari had out-paced his Mercedes team, adding that Leclerc did a great individual job.
“That was a really hard job today,” said Hamilton. “This weekend, the Ferrari has been incredible and Charles did such a great job.
“I’m sure it’s a devastating result for him as he did the job to win the race.
“We were definitely lucky, but you have to take it as it comes. I still gave it everything in the race and I pushed as hard as I could and, of course, the fight that I had with Vettel was great fun for me.”
Team-mate and championship leader, by one point, Valtteri Bottas conceded: “As a team, we got lucky today, but we kept it together.”
Relieved team chief Toto Wolff conceded that Ferrari had the faster car -– as they had shown in pre-season testing –- but pointed at other factors in deciding the outcome.
“It’s a long championship and you always have to balance performance with reliability and then there is the fortune factor,” he said. “Charles was very unfortunate.
“He had the quickest car and then his fortune swung in the other direction.”