1670s, from Latin Gallicus "pertaining to Gaul or the Gauls," from Latin Gallia "Gaul" and Gallus "a Gaul" from a native Celtic name (see Gaelic), though some connect the word with prehistoric West Germanic *walkhoz "foreigners" (see Welsh). Originally used in English rhetorically or mockingly for "French." The cock as a symbol of France is based on the pun of Gallus "a Gaul" and Latin gallus "cock."
It means not simply 'French,' but 'characteristically', 'delightfully', 'distressingly', or 'amusingly' 'French' ... not 'of France', but 'of the typical Frenchman'. [Fowler]