He wanted to sue Hanna-Barbera for obvious infringement of intellectual property rights, but decided against it because the show was so popular that the inevitable damage to his reputation, if the show were cancelled because of the litigation, outweighed any benefits that might come from the suit.
Mel Blanc was instructed to imitate Art Carney for Barney’s voice, btw, but refused to do it.
In the end, it worked out better for Gleason that he didn’t sue. It’s easy to forget that although The Honeymooners was quite popular, it only ran for one year, from October ’55 to September ’56. But it lived on in syndication and the show’s reputation endured as it became effectively the model for how to do a modern sit-com, all the way up to today. (If you can’t see Ralph and Alice in Homer and Marge, for example, or Norton in Seinfeld’s Cramer, you need to look again.)
If anything, the obvious connection between The Honeymooners and The Flintstones added to the original show’s reputation and could have been nothing but a boon to its viewership in syndication.
Personally, I have very fond memories of watching the show as a kid on a channel from the nearby big city, WTCG. The owner of WTCG happened to be a quirky, loudmouthed guy named Ted Turner who came up with the crazy notion of using a satellite to broadcast his content — consisting almost entirely of low-cost reruns of old shows, along with Atlanta Braves games — all over the country, inventing what was called the “Super-Station,” now known as TBS.