The genetic fallacy is committed when an idea is either accepted or rejected because of its source, rather than its merit.
Even from bad things, good may come; we therefore ought not to reject an idea just because of where it comes from, as ad hominem arguments do.
Equally, even good sources may sometimes produce bad results; accepting an idea because of the goodness of its source, as in appeals to authority, is therefore no better than rejecting an idea because of the badness of its source. Both types of argument are fallacious.
(1) My mommy told me that the tooth fairy is real.
(2) The tooth fairy is real.
(1) Eugenics was pioneered in Germany during the war.
(2) Eugenics is a bad thing.
Each of these arguments commits the genetic fallacy, because each judges an idea by the goodness or badness of its source, rather than on its own merits.