"Showing the fig" was a vulgar gesture made by sticking the thumb between two fingers, a display which vaguely resembles a fig, itself symbolic of a vagina (sykon also meant "vulva"). The modern accepted explanation is that prominent politicians in ancient Greece held aloof from such inflammatory gestures, but privately urged their followers to taunt their opponents. The sense of "mean, servile flatterer" is first recorded in English 1570s.

The explanation, long current, that it orig. meant an informer against the unlawful exportation of figs cannot be substantiated. [OED]