Not in Texas. If gangs are illegal, or if the gangsters were doing something illegal, they lose the right to self defense. Carrying guns without a permit outside of their residence or vehicle for instance.
Laws are written to be victim neutral. Even the worst person has the right to self-defense if the situation warrants. Mere illegality of certain non-provocative acts does not nullify that right- you might get convicted of illegal carrying or ownership, but if you- or a person you came to the rescue of- were attacked unprovoked, you can still use self-defense.
If, OTOH, the gang was committing a violent crime- even something as simple as brandishing- when attacked, self-defense won't be allowed as a defense.