If via a court, there would be a public record.
I have heard of employers telling employees to be quiet. I have never heard of that being referred to as a gag order.