Julia Pierson offered her resignation to the Secretary of the Department of Homeland Security on Wednesday.
News of another incident involving an armed man allowed in a lift with Mr Obama compounded calls for her to go.
"I salute her 30 years of distinguished service to the Secret Service and the Nation."
Jon Sopel, BBC North America editor
"Restraint?" some commentators and lawmakers have exclaimed in disbelief.
penetrated into the inner sanctum of the leader of the free world?
In an interview with Bloomberg News after her resignation was announced, Ms Pierson said she knew Congress had "lost confidence in my ability to run the agency''.
Indian prime minister
There she acknowledged the Secret Service security plan was "not executed properly" during a recent breach of the White House.
residence while carrying a knife.
On Wednesday, Mr Gonzalez pleaded not guilty to charges against him, including entering a restricted building or grounds while carrying a deadly or dangerous weapon.
unlocked door, then barrelled past a guard and ran into the East Room before being tackled.
The incident is the latest in a string of security lapses overseen by the Secret Service, tasked with guarding the Obama family.
This contravened a protocol that only members of the Secret Service are allowed to carry weapons in the
presence of the president.