"The Illusionist" is indeed set in and around 19th Century Vienna--date rather nebulous, since the story action involves both a repressive secret police regime similar to that in place before the Metternich rebellion of the 1840's, and a Crown Prince that partakes of both the unhappy Prince Rudolf, who died under mysterious circumstances in 1886, and Francis Ferdinand, who was assassinated in Sarajevo in 1914.
The plot involves the (literally) forbidden love between the boy who grow up to be the famous magician Eisenheim (Edward Norton) and the girl who would become Archduchess Sophie (Jessica Biel), leading candidate to become the Crown Prince's consort.
Young Eisenheim literally meets an old man along the road who shows him magic--real or illusionary is left in ambiguity. The boy, the son of a cabinet maker who works on Sophie's family's estate, turns his skills to the crafting of magic tricks, which he uses to "enchant" the young Sophie after a chance encounter. Their plan to run away together is thwarted by her family's vigilance, and Eisenheim gets the message to leave the village.
A decade or so later, he returns as the famous illusionist, having traveled the world to learn esoteric secrets. (One of his illusions is "The Orange Tree," orginated and made famous by Robert Houdin, the magician from whom Erich Weiss borrowed the name "Houdini." Movie special effects make the illusion look more real than it would in life, althought the diagrams you see of it later in the film are close to the alleged real thing.) Sophie, attending with the Crown Prince, becomes a volunteer in an eerie mirror trick (one of a number in the movie not explainable by modern ilusionary techniques)and she an Eisenheim recognize each other. She isn't happy with her pending betrothal to Prince Leopold (Rufus Sewell) , who wants her mainly for her political value, and is willing to take up with Eisenheim where they left off. Meanwhile, Leopold, sensing a rivalry makes it his business to show up the magician, and, when he fails at that, to drive him away.
What happens after that is a very convoluted plot, and it may be giving too much away even to say that all is not as it seems.
Sophie dies after an argument with Leopold, and Eisenheim takes revenge by staging a new show based on one trick--his uncanny ability to seem to raise shades of the dead, including Sophie, who hovers on the edge of accusing Leopold from beyond the grave.
How Eisenheim works this trick is never explained, although we do get an exposition of the greater and grander illusion that ultimately brings about Leopold's downfall, which is a wonderfully daring scheme. The apparent plot doesn't appear to give Sophie much to do, but we later find that her character has actually undertaken the most difficult and dangerous part of the trick (much as the stage magician's assistants, or "box-jumpers" do teh work of stage tricks) while Eisenheim provides the distractions that fool the audience's eye.
We very much enjoyed the movie despite some plot holes that showed up chiefly in examining it after it was over. While watching it, we were quite engaged. Excellent performances by all the cast, especially Paul Giammati as the ambitious Chief Inspector Uhl, and Aaron Johnson and Eleanor Tomlinson as the young Eisenheim and Sophie. Very much worth seeing. Young children won't get the story, and there is some violence and sexual implication.