There's a couple of different theories out there about "the bird", i.e. extending one's middle finger toward someone to communicate displeasure. This theory grew out of an old practice of hissing at poor stage performers back in the day, you can read about what hissing and "the bird" have to do with one another here.
Another theory has to do with The Clouds, a play written in 423 B.C. That short explanation is given here.
And finally, one last theory - perhaps the most plausible of all - is that the middle finger is a sexual gesture meant to represent having sex. Wikipedia gives all the info on this theory.