Mr Gates, who has written a book about the solutions to climate change, said it was important to keep trying to limit warming even if the 1.5C target was missed.
“It’s all a matter of degrees, so to speak,” he said. “That is, hitting 2.5C is better than hitting 3C, hitting 2C’s better than hitting 2.5C.”
Mr Gates said it was vital that richer countries helped the costs of green technology come down through innovation and investment so poorer countries did not face a large premium.
“We cannot afford to subsidise the green premiums to the middle income countries. That would be trillions of dollars,” he said.
The Microsoft chief said the UK’s climate commitments were “exemplary”, pointing to its record in phasing out coal from its electricity system and adding: “The UK gets a very good grade on climate progress.”
Mr Johnson on Tuesday launched a global agreement between 35 countries to help poorer nations access cheap electric cars, and wind turbines to make green technologies the “go-to”.
He also warned that there would be “economic catastrophe” if climate change was not tackled, in a message to voters and Tory MPs sceptical at his promise to reach net zero by 2050.
He also made clear he would not call a referendum on the net zero target, saying the UK had experienced enough referendums in recent years.
Green groups said the deal’s commitments to move towards fossil-free steel, which covers 32 per cent of the global production, undermined the case for the controversial deep coal mine planned for West Cumbria.
More than 80 per cent of the coal is intended to be exported for steel production.
Roz Bulleid, the deputy policy director at Green Alliance, said the Government should invest in clean steel to avoid losing out to global competitors.
She said it “must make the right decision on the Cumbria coalmine, which could end up obsolete as most of the world looks set to switch to cleaner fuels”.
On Monday, Mr Johnson said he was against new coal, but that the establishment of the coalmine was a local issue.