Mr Johnson said he developed mild symptoms over the past 24 hours, including a temperature and cough.
He said he will now self-isolate in No 10 but will “continue to lead the government’s response via video-conference as we fight this virus”.
Mr Johnson was last seen on Thursday night, as he clapped outside No 10 as part of a nationwide gesture to thank NHS staff.
In a video on his Twitter account, Mr Johnson, 55, said: “I’m working from home and self-isolating and that’s entirely the right thing to do.
“But, be in no doubt that I can continue thanks to the wizardry of modern technology to communicate with all my top team to lead the national fightback against coronavirus. “I want to thank everybody involved and, of course, our amazing NHS staff.”
“So thank you to everybody who’s doing what I’m doing, working from home to stop the spread of the virus from household to household,” he added.
“That’s the way we’re going to win.”
Mr Johnson was tested at No 10 by NHS staff, on the personal advice of England’s chief medical officer, Professor Chris Whitty, Downing Street said.
He will still be in charge of the government’s handling of the crisis, the statement added. Earlier this week, the prime minister’s spokesman said if Mr Johnson was unwell and unable to work, Foreign Secretary Dominic Raab, as the first secretary of state, was the selected minister to stand in.
It is not known whether Mr Johnson will still be living with his fiancee Carrie Symonds, who is several months pregnant.
Pregnant women are advised to be particularly stringent when following social distancing advice, and minimise social contact for up to 12 weeks.
There are more than 11,600 confirmed cases of coronavirus in the UK, and 578 people have died.
It comes after the Prince of Wales also tested positive for the virus earlier this week.
Prince Charles, 71, is to be displaying mild symptoms “but otherwise remains in good health”, a spokesman said.