Here is what about.com's Urban Legends section has to say (I did not place a link because of other (objectionable) content.
The middle-finger gesture, which has apparently had phallic connotations in every culture in which it has been used, is much older. We know it dates back to ancient Greece, at least, where it was referenced in "The Clouds," a play written by Aristophanes in 423 B.C. It was also well known to the Romans, who referred to it variously as digitus infamis ("infamous finger") and digitus impudicus ("indecent finger"). In all likelihood its origins were prehistoric.