It is Ms. Nielsen who sends out the emails announcing internal policy and planning meetings that now contain a clipped addendum — “principals only” — with a stern warning that any subordinates who wander in will be immediately ejected.

She is also responsible for keeping Mr. Kelly’s no-fly list of aides he deems to be unfit to attend serious meetings, the most prominent of whom is Omarosa Manigault, the former “Apprentice” star with an ill-defined job and a penchant for dropping into meetings where she was not invited.

Throughout the White House, the circle of decision-making is shrinking, leaving staff members accustomed to wandering in and out of meetings — and the Oval Office — in a sour mood. And the feelings are not confined by the gates of the executive compound. Outside Trump advisers, accustomed to getting their calls briskly returned, are complaining that their phones have gone silent since Mr. Kelly took over six weeks ago.

The president’s first chief of staff, Reince Priebus, a former chairman of the Republican National Committee, made only a cursory study of the structure and history of the West Wing, much to the disgust of a half-dozen Obama administration officials who offered to coach him but were, for the most part, politely rebuffed.

But perhaps his biggest problem was that he was a fund-raiser by trade and schmoozer by temperament with very little knowledge, or interest, in policy and the inner workings of government. Mechanics who never lift the hood tend to lose their jobs. Mr. Trump, who attracts subordinates who flatter rather than challenge, also seemed to take special delight in humiliating him, often ignoring his advice and referring to him by the diminutive nickname “Reincey.”

Ms. Nielsen’s role is similar to the one that Katie Walsh, a longtime deputy, assumed for Mr. Priebus when he first joined the White House — gatekeeper to the gatekeeper. And, as has happened with Ms. Nielsen, some members of the White House have chafed at a woman asserting power — and made her a target for the anger that they cannot express at the chief of staff.

But there is a critical difference, people close to Mr. Kelly said. When Ms. Walsh came under attack, Mr. Priebus did little to protect her, and she left after only a few months. Mr. Kelly’s experience in the military, by contrast, has led him to the conclusion that it is hard to survive a successful attack on a top subordinate without being weakened.