Mercedes driver would only narrowly missed out on challenging the leading two drivers after fighting back but was held up by Ocon's team-mate Fernando Alonso.
"Fernando gave me hell out there," said Hamilton.
"It was awesome racing, pretty on edge at least once but great racing. And yeah, really difficult weekend, or day, obviously I had a lot of work to do from the back.
"Very hard to follow but [I was] just giving it absolutely everything right until the last lap. I hoped that I could maybe catch these guys.
"Maybe a couple of laps more we could have a bit of a duel – but I’m actually glad that we didn't have any more laps because this is very much needed."
Ocon shows he has potential - Hamilton
Ocon was once a part of Mercedes' junior programme but his F1 career was left in the balance after being dropped by Racing Point at the end of 2018.
After a sabbatical, the Frenchman returned with Renault in 2020 and after impressing with the rebranded Alpine team, Hamilton explained: "I think in his journey, this shows to everyone out there his potential.
"He’s racing against a two-times World Champion. Fernando’s not an easy driver to beat. So this really speaks volumes."