The decision is a major victory for the Trump administration, which has denounced the injunctions against its policies.