A federal judge could soon decide whether the Trump administration violated the U.S. Constitution when it stripped away the press credentials of CNN’s chief White House correspondent.

Legal experts say CNN’s lawsuit, which was filed Tuesday in Washington, makes plausible First Amendment claims that will be weighed carefully against the White House’s explanation for locking out the journalist, Jim Acosta.

The...