Early Boomers would associate the phrase with The Howdy Doody Show, where it referred to the studio audience of kids. In fact, the first known printed use of “peanut gallery” comes from an 1867 review of a vaudeville show in New Orleans, and it refers to the food item unruly patrons would throw at performers they didn’t like. (Warning: the sentence in question is pretty racist.) – The Conversation