If the supposed "gag order" is actually an NDA, then that puts a different light on things.
And NDA is a form of contract (the "A" = "agreement" = "contract"). One of the fundamental principles of contract law in the U.S. is that a contract is not enforceable (that is to say, is meaningless) unless the things the parties agree to do are legal.
Thus, if Don Julio puts out a "contract" on Sammy the Snitch, and Tony the Torpedo agrees to whack Sammy the Snitch for 100 grand, and Don Julio pays the money but Tony doesn't whack Sammy the Snitch, Don Julio cannot take legal action against Tony for breach of contract. Nor can Tony sue Don Julio if he whacks Sammy and Don Julio doesn't pay. This is not only because it would be silly for either one to admit in court to having made the contract in the firstplace. There's a more fundamental legal principle involved, that still applies even if Tony or the Don or both were willing to go to jail to get the terms of the contract enforced. Since neither whacking a snitch, nor paying a guy to whack the snitch, are legal, the contract has no legal standing.
An NDA is simply an agreement to protect certain privileged information (which includes not revealing the information, but is not limited to that; it can also include exercising due diligence to protect the physical security of documents in one's possession, for instance). Like any contract, it ceases to be an enforceable contract if and when holding to its terms becomes an illegal act, such as when doing so would constitute conspiracy, obstruction of justice, or spoliation of evidence.
So, any statement to the effect of "I have documents that someone has done/is doing something illegal, but I can't reveal them due to being gagged by an NDA" is not credible.
When it's not an issue of documentary evidence but of simple first-hand knowledge, things aren't quite so simple, because in most circumstances withholding knowledge from investigators (as opposed to lying to them), by exercising one's right to remain silent or taking the Fifth when subpoenaed, is not illegal. However, a civil contract (e.g. an NDA) seems to be a flimsy pretext for refusing to reveal material evidence of criminal wrongdoing. It's basically saying, I won't reveal the wrongdoing because I'd prefer to honor my civil contract with the criminal. Not at all a morally commendable stance, though it may be personally expedient.
Respectfully,
Myriad