For this phrase I cannot do better than quote, in its entirety, the wonderful explanation by Gary Martin in The Phrase Finder.
All things are a potential source of profit or advantage.
Grist is the corn that is brought to a mill to be ground into flour. In the days when farmers took 'grist to the mill' the phrase would have been used literally to denote produce that was a source of profit.
An early figurative use of phrase is found in Arthur Golding's translation of The Sermons of J. Calvin upon Deuteronomie, 1583:
"There is no lykelihoode that those thinges will bring gryst to the mill."
There are many grist mills still in existence and they would have specialised in whatever type of cereal was commonplace in their location - wheat, buckwheat, oats, corn etc. The association between grist and mills is clear and it was also listed as proverbial in William Camden's Remaines of a Greater Worke Concerning Britaine, 1605:
The horse that is next the mill, carries all the grist.
Grist is usually referred to as unground corn. When the phrase was coined, in the UK in the middle ages, corn would have meant wheat, as opposed to what is called corn in many other parts of the world, which is known as maize in the UK.
Oats that have been husked but not ground are known as grit. This is the source of the name the thick maize-based porridge that is widely available in the southern states of the USA - 'grits'. There is clearly both a linguistic and culinary connection between grist and grits, although not as straightforward a one as a simple spelling mistake - they both derive from the verb 'grind'.
'Grist to the mill' is still used, although less commonly than when I was a lad in the 1960s. Were he alive to see it, this would give some satisfaction to George Orwell, who dismissed the phrase as 'a dying metaphor' in his essay Politics and the English Language, 1946:
Dying metaphors ... a huge dump of worn-out metaphors which have lost all evocative power and are merely used because they save people the trouble of inventing phrases for themselves. Examples are: Ring the changes on, take up the cudgels for, toe the line, ride roughshod over, stand shoulder to shoulder with, play into the hands of, no axe to grind, grist to the mill, ...
That is a great article and I recommend anyone to use The Phrase Finder (if a phrase isn’t in this blog, of course!).