The fact, that the diet most directly affects the human well-being, was probably known in Egypt and Mesopotamia. But it just so happened that the ancient Greeks left most of all works about what and how to eat.
Hippocratic body of writing (a set of works whose authorship is attributed to the “father of medicine”, the Greek physician Hippocrates) includes, inter alia, the essay “On a diet”, the text of which contains recommendations on nutrition of patients afflicted with various ailments.
By the way, the Greek word δίαιτα meant not just a diet but a way of life in general. Doctors were well aware of the importance of a comprehensive approach: only the food, even the most “correct” one, does not guarantee the health and longevity. The ancient physicians thought that a man needs to move.
For whom the movement was his work was prescribed a special professional diet. Olympians ate dry food – cheese, bread and dried figs. Later they came up with another way to stay in shape: just meat and wine, no flour, no vegetable and fruits remained on the table of athletes. Centuries later, a similar diet was named carbonhydrate free or protein free diet.