“When Woody Got His Groove Back” might have been the subtitle of “Midnight in Paris,” the wry, time-traveling fantasy that has now become the comedy icon’s most financially successful film. Together with “Honeymoon Motel” — Allen’s contribution to the three-pronged Broadway hit “Relatively Speaking” — the 75-year-old icon of American comedy proved he could attract auds in a way he hasn’t since the days of “Hannah and Her Sisters” (1986) while also proving the resiliency of what has been the central thesis of his entire career: That comedy is tragedy happening to someone else.

The central tragedy of “Midnight in Paris” is that frustrated screenwriter Gil Prender (Owen Wilson) was born at the wrong time and place. Instead of the Paris of Hemingway and Picasso, he lives in Twitter-Age L.A. Despite Allen’s image as an existential humorist and intellectual, the fulfillment of impossible desire — Gil’s immersion in the Paris of the past — echoes career-long sense of fantasy. For Gil, it’s time travel; for Alvy Singer, it was a romance with Annie Hall. It’s all the same.