Dr. John Anthony derives it from the Italian piccola nicchia (a small task), each person being set a small task towards the general entertainment. (French, pique-nique.)
The modern custom dates from 1802, but picnics, called eranot, where each person contributed something, and one was appointed “master of the feast,” are mentioned by Homer, in his Odyssey, i. 226.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894