She added, “I don’t think the average American realizes the amount of work and complexity that goes into securing these events.”

Image Omar Gonzalez, in 2009, was believed to be living in his car. Credit... Jerry Murphy, via Associated Press

Speaking to reporters at the White House, the president also defended the agency. “The Secret Service does a great job,” Mr. Obama said. “I’m grateful for all the sacrifices they make on my behalf and on my family’s behalf.”

In her job for about 18 months, Ms. Pierson was supposed to be the one to fix the agency’s reputation, which had been tarnished after a dozen agents were fired for having prostitutes in their hotel rooms in Cartagena, Colombia, as they prepared for a presidential trip there in 2012.

In March, however, two Secret Service agents were sent home from Amsterdam after one of them got so drunk that he could not get into his hotel room and passed out in a hallway. That incident once again raised questions about the agency’s culture and forced Ms. Pierson to implement new policies to curb drinking. And the episode Friday on the front lawn of the White House — along with the reports of Mr. Gonzalez’s previous interactions with the Secret Service and other law enforcement agencies — has raised more serious questions.

“I worry about her whole approach,” said Representative Jason Chaffetz, Republican of Utah, who is the chairman of a subcommittee that on Monday scheduled a hearing on the incident for next week. “I do question the director’s leadership. This is a place where we can never, ever make a mistake.”

On Friday, officials said that officers guarding the White House had not perceived Mr. Gonzalez as a threat because he was not obviously carrying a backpack or other bag that could contain explosives. After he was detained, Mr. Gonzalez was determined to be unarmed except for a small, folding pocketknife.