The judge plans to issue an injunction preventing the government from barring openly gay service members. The Justice Dept., which defended the policy during the trial, can appeal the decision.