The closing of the film was not scripted when filming began, so the director (Mel Stuart) had to call David Seltzer and ask him to think of something. Seltzer came up with the "happily ever after" bit in five minutes.
The scene where the technician tries to impress the three businessmen with the large computer to (unsuccessfully) give the results of the (then 3) remaining golden tickets was the last scene filmed for the movie. It was filmed at such a last minute that there was a ton of luggage scattered around the set as the cast and crew were already in the process of packing up to wrap up the movie.
Roald Dahl was reportedly so angry with the treatment of his book (mainly stemming from the massive rewrite by David Seltzer) that he refused permission for the book's sequel, "Charlie and the Great Glass Elevator", to be filmed. Seltzer had an idea for a new sequel, but legal issues meant that it never got off the ground. Reportedly, Dahl was so unhappy that he refused to ever watch the completed film in its entirety. Once, while staying in a hotel, he accidentally tuned into a television airing of the movie, but reportedly changed the channel immediately when he realized what he was watching.
After reading the script, Gene Wilder said he would make the film under one condition: that he would be allowed to do a somersault in the scene when he first meets the children. When asked why, Gene Wilder replied that having Willy Wonka start out limping and end up somersaulting would set the tone for that character. He wanted to portray him as someone whose actions were completely unpredictable. His request to do the somersault was granted.
The bees that were used in the gum machine were actually wasps. Paris Themmen, a notorious troublemaker on the set, apparently let them out of their bell jar and was stung on the face.
The final Oompaloompa song took a total of 50 takes.
The scene where Augustus Gloop was interviewed for being the first Golden Ticket finder was shot at a real German restaurant. Most of the cast members went there for lunch during the time the movie was being filmed.
The film was originally financed by the Quaker Oats Company. They hoped to tie it to a new candy bar they intended to bring on the market. When the film was released, the company began marketing its "Wonka" chocolate bars. Unfortunately, an error in the chocolate formula caused the bars to melt too easily, even while on the shelf, and so they were taken off the market. Quaker sold the brand to St. Louis based Sunline, Inc. (which later became part of Nestle via Rowntree) not long after this; Sunline was able to make the brand a success, and Wonka-branded candy (most of which isn't chocolate-based) is still available in the USA.
In the scene where Willy Wonka (Gene Wilder) drinks from a flower-shaped cup and then eats the cup, the cup itself was made of wax. Gene Wilder had to chew the wax pieces until the end of the take, at which point he spat them out.
The length of Veruca Salt's hair becomes progressively shorter throughout the movie as the filmmakers kept burning off Julie Dawn Cole's split ends.
Julie Dawn Cole (Veruca Salt) hated chocolate.
According to the DVD commentary, Julie Dawn Cole kept several props from the movie (when instructed not to) including the Golden Ticket, an Everlasting Gobstopper, and a Willy Wonka candy wrapper.