Ergotism results from poisoning by toxins produced by the Claviceps fungus, which grows on grains.