Mr Johnson responded, telling the parent "there's no press here".
But the parent - whose child was being treated at Whipps Cross University Hospital - gestured to cameras filming the confrontation and said: "What do you mean there's no press here, who are these people?"
The parent claimed there had been "years and years and years of the NHS being destroyed" and said the situation was "not acceptable".
He told the Prime Minister: "There are not enough people on this ward, there are not enough doctors, there's not enough nurses, it's not well organised enough."
He wrote on Twitter: "Boris Johnson has been an MP, mayor of London, Cabinet minister and now PM while the NHS has been neglected, just as my daughter was last night.
"Rather than drips of money for press opportunities he should get on with properly supporting the NHS."
Mr Salem said his seven-day-old daughter had been admitted to hospital in a "gravely ill" state.
Mr Johnson explained he was "here to find out" about the situation but the man said: "It's a bit late isn't it? Years and years and years of the NHS being destroyed."
The man added: "The NHS has been destroyed ... and now you come here for a press opportunity."
A spokesman for the prime minister said Mr Johnson was visiting public services to see for himself the reality of the situation.
The spokesman said the man was understandably "very distressed" and the Prime Minister was "not going to hide away from those circumstances when he goes on these visits, and so obviously is keen to talk to people and empathise and see what he can do to help".
"It's also a reminder of why exactly he is so keen to make the NHS a priority and make sure it's getting the funding that it requires," the spokesman added.
Later on Wednesday, writing on Twitter, Mr Johnson said he was "glad this gentleman told me his problems".
The Prime Minister added: "This isn’t an embarrassment this is part of my job.
"I’ve been PM for 57 days, part of my job is to talk to people on the ground and listen to what they tell me about the big problems.
"It doesn’t matter if they agree with me.
"I’m glad this gentleman told me his problems.
"This isn’t an embarrassment this is part of my job."