There does not seem to be a specific name for this particular fallacy, see related discussion:
"The other person's response was that I have never had to live on my own therefore my opinion on the subject was invalid. I feel like this is wrong, I'm using data given on federal websites to make my assertions so I feel like personal experience is irrelevant".
But it falls into a broad group of fallacies known as ad hominem, literally "to the man", which attack traits of opponents instead of addressing their arguments. These traits are not restricted to a group an individual belongs to, and often include character traits and behavior. A subclass referred to as ad feminam, "to the woman", is in use since 1963, and is directed against arguments made by women.
Perhaps the closest named subclasses of ad hominem are They Are Not Like Us dismissals in the spirit of "they don't think like us", and ergo decedo, "therefore leave", where a criticism is dismissed based on affiliations of the critic. However, it is usually applied in contexts of questioning critic's loyalty rather than competence, as in "if you don't like it here why don't you go somewhere else".
Somewhat more remote is the genetic fallacy/fallacy of origins: judging a claim based on its source rather than its merits. However, in some cases lack of personal exposure may in fact devalue the person's argument, especially when ethical and cultural issues are involved.