Leclerc had dominated the race and looked set to claim a maiden grand prix win before an energy recovery failure severely hampered his performance in the closing laps.
“You drove great this weekend, you really drove fantastic,” Hamilton told Leclerc before they stepped onto the podium following the race.
“You've got a long, long future ahead of you. I know it sucks in this moment, but you've got a long, long way to go – more than twice more than me, and twice more than him (Bottas) still.”
It followed a brief exchange in parc ferme immediately after the race when Hamilton embraced the Ferrari driver.
Despite the disappointment, Leclerc was pragmatic when asked about the issue which cost him a likely win.
“It happens, it's part of motorsport, unfortunately today it was not our day,” he said.
“Of course I'm extremely disappointed like the whole team, but it happens in the season. I think we made the best out of it.
“We have been lucky in a very unlucky situation because helpfully we had the Safety Car at the end otherwise we would have finished even more rearward and also I don't think with the fuel it would have been okay.
“So a very hard one to take, but thanks to the team for the amazing car all weekend long and I'm pretty sure we'll come back stronger.
“I'm never really looking at the results, I'm more looking at the potential there was to do better,” he added.
“Today third was not our place.”
Leclerc sits fourth in the drivers' championship with 26 points, four clear of his more experienced team-mate Sebastian Vettel who spun out of what was second place while battling with Hamilton.
The German ended the race fifth, having dropped to ninth following the spin which left him needing a new set of tyres and front wing.
Mercedes meanwhile salvaged a second consecutive one-two result on a weekend where Ferrari clearly held a pace advantage.