In a highly unusual move that reverberated inside the West Wing and across the media spectrum, The New York Times on Wednesday published an Op-Ed article by an unnamed administration official that called President Trump “erratic” and described a “quiet resistance” of cabinet members who had whispered about taking steps to remove him from office.

It is exceedingly rare for The Times to grant anonymity to a writer on its Op-Ed pages, and the paper could cite only a handful of previous cases. But James Dao, the paper’s Op-Ed editor, said in an interview that the material in the essay was important enough to the public interest to merit an exception.

“This was a very strongly, clearly written piece by someone who was staking out what we felt was a very principled position that deserved an airing,” Mr. Dao said.

It took less than 90 minutes from the column’s publication — which prompted news channels to cut in with special reports and set off a frenzy among White House aides — for the president himself to go on live television and denounce the essay, its author and the news organization that published it.