Judges a claim good or bad because of where it came from rather than on its present merits. A true idea can come from a bad source, and a false one from a respected source.
Example "That study was funded by an energy company, so its numbers must be wrong."
Both judge a claim by its source instead of its content; ad hominem targets the speaker's character, the genetic fallacy targets where the claim came from.