The prime minister told BBC Breakfast he was "jumping" to music when he landed on a shard of glass which got stuck in the sole of his foot.
He said the staff at his local hospital in Uxbridge were "incredible".
Mr Johnson said the incident happened last year, but that his family use the NHS "the whole time".
"I am fortunate enough to say that I have a wonderful hospital in Hillingdon, in Uxbridge which I represent," Mr Johnson said.
"And, foolishly, I was making a barbecue and there was a bit of broken bit of broken glass - someone had dropped a cafetiere, you know very sharp bits of glass.
"I was jumping up, I think there was music playing, and a piece of glass went straight up into the bottom of my foot, my sole, my heel. It was absolute agony. It went away for a while, but Hillingdon were absolutely incredible."
Health Secretary Matt Hancock was accused of being "staggeringly out of touch" after he claimed on Thursday that the NHS was performing "better than it ever has".
After official figures showed a record 4.42 million people were waiting for treatment, the prime minister - who has made the NHS a key battleground in the election - said they had to do more.
"We have got to do better, I don't deny that," he told the BBC's Breakfast programme.
"That doesn't mean that I am not incredibly proud of what the NHS is achieving. We have amazing staff and amazing doctors and, yes, we need to be investing more in them.
"That is exactly what we are doing."
to "end the NHS crisis with a £26bn "rescue plan" paid for by taxing the richest in society. They said the investment would provide safe, quality care, recruit thousands of staff, rebuild crumbling facilities and provide modern state-of-the-art equipment.