The gum machine is a machine located in The factory. It produces a Chewing Gum which transforms the chewer into a gigantic blueberry.
In the film, Violet Beauregarde chews the stick of gum produced by the machine and subsequently blows up into a huge blueberry. Violet swells to such a size that she needs to be rolled by a team of Oompa Loompas, who look like ants next to Violet's incredibly large body. Violet is rolled on to the Candy Boat and taken along to the Juicing Room, where she is squeezed back to normal size.