CNN showed footage of the president and his advisers wearing the mask at the Walter Reed Army Medical Centre in Washington.
"I'll probably have a mask if you must know. I'll probably have a mask. I think when you're in a hospital especially in that particular setting, where you are talking to a lot of soldiers, people that in some cases just got off the operating table. I think it's a great thing to wear a mask. I've never been against masks but I do believe they have a time and a place," he told reporters.
CNN said this was the first time since the pandemic began that the White House press corps have received a glimpse of Trump with a face covering.
Trump has previously maintained face coverings did not need to become mandatory to curb Covid-19's spread.
Speaking to Fox Business Network last week, Mr Trump said: "I'm all for masks."
He added that he "sort of liked" how he looked with one on, likening himself to the Lone Ranger.
But when the US Centers for Disease Control (CDC) in April began recommending people wear masks or cloth coverings in public to help stop the spread of the virus, Mr Trump told reporters he would not follow the practice.
"I don't think I'm going to be doing it," he said back then. "Wearing a face mask as I greet presidents, prime ministers, dictators, kings, queens - I just don't see it."
Some media reports have suggested aides have repeatedly asked the president to wear one in public.
More than 137,000 people in the United States have died from the coronavirus.
During the same visit, Trump also defended his decision to spare his friend Roger Stone a prison sentence.
Stone was found guilty of obstructing an investigation into Russian interference in the 2016 US election, including making false statements to Congress and tampering with a witness and was due to begin a three year prison sentence this week.
Trump said Stone was the victim of a witch hunt.
"Roger Stone was treated very unfairly. Roger Stone was brought into this witch hunt, this whole political witch hunt and the Mueller scam - it's a scam, because it's been proven false," he said.
"And he was treated very unfairly, just like General Flynn was treated unfairly, just like Papadopoulos was treated unfairly. They've all been treated unfairly."