The White House barred a CNN journalist from attending a public appearance by President Trump in the Rose Garden on Wednesday, an apparent act of retaliation that drew immediate rebuke from news organizations and signaled the latest escalation of Mr. Trump’s hostilities toward the news media.

Kaitlan Collins, a White House correspondent for CNN, said she was called into the West Wing and chastised by administration officials for what they deemed “inappropriate” questions that she had asked of Mr. Trump during an Oval Office photo opportunity earlier in the day.

The officials — Bill Shine, the newly appointed deputy chief of staff, and Sarah Huckabee Sanders, the press secretary — then informed Ms. Collins that they would not allow her to attend Mr. Trump’s public remarks with the president of the European Commission, an event that was otherwise open to the media.

“They did not like the questions I asked President Trump about the news of the day,” Ms. Collins said.