Garlic has a high concentration of allicin. Allicin is a natural anti-fungal compound. Of course, dandruff is caused by dry skin or bacteria of the scalp, so this ingredient would do justice.
Garlic can be used as an oral treatment or topical treatment. Mashing up garlic with honey* and applying it to the scalp is a great treatment. Leave it on for 5-10 minutes and then rinse.