means that
something provides useful material, an advantage or a source of profit to someone. Grist is grain brought to a mill to be ground.
also
All is grist that comes to the mill, (You can use everything you receive)
The criticism of her first exhibition was grist to her mill, giving her ideas for a much stronger second collection.