I am going by the 1971 film, here; the 2005 version is decent but portrays Wonka as a flawed, childish man. I have never read the book, so forgive me if this is supposedly more clear in there.
Willy Wonka represents God. He is a mysterious man who does miraculous things (like move chocolate bars into TV sets or make entire meals into sticks of gum), but has recluse himself into his factory because he no longer loves the world. But one day, he decides to call five children (“by name”, as we learn in the end) in order to come to the factory and live there with him. He also becomes upset at people who fall into temptation and break the factory’s rules, but he does nothing to stop them; it is their choice.
The factory represents Heaven. Incredible things happen there; it is like a paradise, especially the garden made out of candy.
Mr. Slugworth represents the devil. He is an agent of God that tests people’s faith to show it to be genuine. The Everlasting Gobstopper, which he offers fantastic wealth for (like Christ’s temptation in the desert, where Satan offered him all the world’s kingdoms), represents freedom. You can use it to glorify God, or you can use it for your own personal endeavors.
The Oompa Loompas represent the angels. They do Mr. Wonka’s work and are very concerned with the sins of the people who visit the factory.
The children and their parents come to the factory and are very impressed with its glory, but each are held back by their sins. Augustus represents gluttony, of course; Verouca is greed; Violet is pride (she wants to win at everything); I can’t pin anything on Mike, but perhaps sloth, as he is obsessed with TV. When they each commit their mortal sin (falling into the chocolate river; eating the blueberry gum; falling into the egg pit; getting into the TV-atron), Mr. Wonka doesn’t stop them. He allows them to do this. And because of it, they are denied the final prize that the Golden Tickets offered, which was salvation.
Charlie commits a sin, too (drinking the Fizzy-Lifting Drinks), but he is sorrowful for it. Wonka denies him the factory for it, whereby Grandpa Joe shouts “you’re a crook” and is mad that at Wonka for “building up his hopes and then smashing all his dreams to pieces”. To apologize to Mr. Wonka, Charlie returns the Gobstopper, whereby Wonka reveals his entire plan; happily shouting “you won, Charlie, you won!” and giving him the factory (i.e., salvation). Note that salvation is offered to them; the other children freely denied it, but Charlie accepted it.