"If you're violating your standards faster than you can lower them, time to go away," he said.
Williams, 55, announced that he was seeking treatment for alcoholism less than two weeks after Gibson's high-profile arrest in late July.
"Well, if (rehab) was good enough for him, I'll go," Williams said. "I just think it was kind of like, well, he's in, let's go now."
Williams said he had been sober for 20 years when he started drinking again.
His latest film, "Man of the Year," hits theaters Oct. 13.