It comes from two Greek words, deipnon, the chief meal or dinner, and sophistes, a master of his craft, a clever or wise man. From the latter we get our modern word sophistry, which has gone down in the world, so that it means arguments that are undoubtedly clever, but also specious, fallacious, or designed to deceive.
Its origin is a 15-volume work entitled Deipnosophistai, that was written by the Greek Athenaeus sometime after AD 228, in which a group of learned men converse at a banquet. Though a principal subject is food and the preparation of food, from which we learn a great deal about classical Greek cookery, the subject matter ranges very widely.
In English, the word most often refers to these learned men. Only rarely does it appear as a serious term, and even then there is more than a hint of the archly whimsical introduction of an over-erudite expression. One example will serve, from Richard Ford’s A Hand-book for Travellers in Spain of 1845: “Spanish Cookery, a ... subject which is well worth the inquiry of any antiquarian deipnosophist.”
One curiosity is that the word appears to have shifted meaning. The Oxford English Dictionary says it refers to a master of the art of dining, which might be somebody versed in the culinary arts or appreciative of fine food, a gastronome or gourmet. Mr Ford is clearly using it in that sense. However, modern dictionaries — when they include it at all, which isn’t often — prefer to apply it to sparkling and erudite dinner-table conversationalists.
These days, the word seems to turn up most often either in the more arduous later stages of spelling bees, as an example of a humorously weird word, or in the vocabulary of toast masters.