President Trump’s personal assistant, Madeleine Westerhout, whose office sits in front of the Oval Office and who has served as the president’s gatekeeper since Day 1 of his administration, resigned on Thursday, two people familiar with her exit said.

Ms. Westerhout’s abrupt and unexpected departure came after Mr. Trump learned on Thursday that she had indiscreetly shared details about his family and the Oval Office operations she was part of at a recent off-the-record dinner with reporters staying at hotels near Bedminster, N.J., during the president’s working vacation, according to one of the people, speaking on the condition of anonymity to discuss White House personnel issues.

The breach of trust meant immediate action: Ms. Westerhout, one of the people familiar with her departure said, was now considered a “separated employee” and would not be allowed to return to the White House on Friday.

The White House did not respond to a request for comment. Ms. Westerhout did not immediately respond to an email seeking comment.