First, unlike Woody Allen's Sleeper, in which the hero is cryogenically frozen and jumps into the future that way, Gil in Midnight in Paris goes from 2010 to the past and back to the present like any decent, genuine time traveler. The mechanism of the the time travel - the stroke of midnight on a quiet corner in Paris - is more like the means in Twain's Connecticut Yankee in King Arthur's Court or Jack Finney's Time and Again, which is to say, close to magical - but still makes the cut as a legitimate time travel story as far as I'm concerned.
And it's excellent indeed, investing Woody Allen's sage, delightful repartee and style into a narrative in which Cole Porter, Ernest Hemingway, the Fitzgeralds, Gertrude Stein, Pablo Picasso, Salvador Dali, and all manner of luminaries from the 1920s figure in our 21st-century hero's adventures in the past. The neurotic Gil (well played by Owen Wilson) - a version of Woody Allen, despite Gil's Californian flair, as are all of Woody's male heroes - plays well and hilariously against these luminaries who no doubt are Woody's as well. The attention to accurate detail of the 1920s, a key ingredient in my book in making any time travel to the past work, was mostly spot on. The only slight error I caught was someone saying "science fiction" - although Hugo Gernsback did create the term some time in the 1920s, he much preferred the term "scientification" at first, and "science fiction" did not come into general use until a decade later. But only a science fiction and time travel fanatic like me would know that.
The question always arises in these sorts of soft time time travel movies - that is, time travel without a machine or some sort of scientific explanation - as to whether the character is dreaming or really time traveling to the past or future. Allen clearly answers this question near the end, when we're shown a private Parisian detective - who was hired to follow Gil by his about-to-be-father-in-law - running around in the age of Louis IV like a chicken without a head. The scene is not only fall-down-funny but indicative that the time travel was not just in Gil's mind. (Yes, Gil could have been dreaming that scene, too, but such solipsism is not much fun, and we see no other evidence of Gil dreaming - unlike, say, the Ethan Hawke character in The Woman in the Fifth, another recent Parisian movie.)
Like most of Woody Allen's movies, Midnight in Paris is not only funny but wise in the lessons it provides. In this case, it's that everyone has their own favorite time in the past, but there's usually some of that still in the present, if you're lucky and alert enough to find it. We enjoyed Midnight in Paris so much, we went on to see To Rome with Love, Woody Allen's 2012 movie, right after. It was also excellent. But Midnight in Paris is something special in the roster of both Allen's and time travel movies, and I predict it will become a classic.