Labeling and discrimination
It seems like ingroup-outgroup stereotyping / bias / discrimination is the concept I'm looking for.  This article seems to sum it up well.

https://www.psychologytoday.com/blog/fulfillment-any-age/201012/in-groups-out-groups-and-the-psychology-crowds