"I hope the whole White House takes a different approach. I don't think there were good precautions taken at the White House. They weren't modeling good precautions, but equally important, they weren't taking good precautions to protect the president, in my view," Gottlieb said on "Squawk Box." "They both need to model better precautions for the nation so that people see a better example being set by our leaders."
Gottlieb, earlier on "Squawk Box," took issue with most of the prevention strategy relying on testing for the coronavirus. Many public health experts during the pandemic have emphasized that coronavirus testing is one component of a larger mitigation strategy. They have said other protocols such as wearing face coverings, maintaining social distance and good hygiene are critical to preventing transmission, too.
Gottlieb, a former Food and Drug Administration commissioner under Trump, said that even the testing system in place at the White House had its shortcomings. The Trump administration had relied on a rapid turnaround test to screen staff and visitors.
"If they were relying on testing alone to keep the virus out of the West Wing and out of the White House compound, they needed a zero-fail testing regime. They didn't have it," said Gottlieb, who led the FDA from May 2017 to April 2019.
"It was told to people in the White House that there was problems with the way they were using testing as a tool to try and prevent virus from getting in the White House compound, and in and around the president, and they didn't really step that up," he added.
Trump's handling of the pandemic has come under criticism for months. He rarely wears a face mask in public and has held campaign rallies with attendees, many maskless, crowded together.
In August, Trump held his keynote Republican National Convention speech on the South Lawn of the White House, with more than 1,000 invited guests and without universal masking. The president also recently nominated Judge Amy Coney Barrett to the Supreme Court at a White House event; several people who were there have since tested positive for the coronavirus.
Gottlieb said the White House needs to rethink its precautions as the pandemic persists. The physician has previously warned the nation may be entering its "most dangerous season" for Covid-19.
"The president didn't need to get infected. I'm pretty certain the president didn't want to get infected. He was not taking reckless risks, not withstanding the things he said when he was out and not withstanding some people's perceptions," Gottlieb contended. "The president didn't want to get Covid, from everything I can glean, and thought he was being protected based the testing that was in place around him."
In a statement to CNBC, White House spokesman Judd Deere said the White House's public health strategy is built on Centers for Disease Control and Prevention recommendations.
"The President takes the health and safety of himself and everyone who works in support of him and the American people very seriously," Deere wrote in an email. "White House Operations collaborates with the Physician to the President and the White House Military Office to ensure all plans and procedures incorporate current CDC guidance and best practices for limiting COVID-19 exposure to the greatest extent possible both on complex and when the President is traveling."
Mick Mulvaney, who had been the president's acting chief of staff from December 2018 until late March, said he believes Trump will not significantly alter his approach to campaigning or governing despite his illness.
"You're never going to keep this president locked in his basement. That was never going to happen. Yes, you could have put him inside a bubble in the West Wing. Yes, you could have restricted him to where no one would actually come into contact with him," Mulvaney said on "Squawk Box." "He likes interacting with people, so I think what the staff was trying to do is balance the demands of health and the demands of the president's personality."
— CNBC's Will Feuer contributed to this report.