WASHINGTON—The head of the Secret Service resigned under pressure Wednesday after a series of embarrassing stumbles that outraged lawmakers, caught the White House by surprise and called into question the security of the president.

Julia Pierson’s resignation marks the end of a swift fall for a Secret Service chief who assumed the job just 18 months ago and was hoping to restore prestige and discipline to an agency grappling with a slew of disconcerting scandals. Instead, another hit: An armed intruder last month scaled a...