A term very often used for this is a turf war, defined by the free dictionary as
- a dispute between criminals or gangs over the right to operate within a particular area
It is very commonly used to describe wars between rival gangs.
Another term you could use is pissing contest. While this does not directly imply gangs, it describes the idiocy of the conflict quite well. It is defined by the online MW as:
a competition between rivals to determine superiority, predominance, or leadership —called also pissing match
Note that the term implies that you consider the people involved and their rivalry childish and silly. It is a term often used by women to describe the petty rivalries of men for example. It comes from the child's game of attempting to produce the longest stream of urine you can.
I do not recommend you ever use it if actually speaking to a member of a gang. You are likely to be sent looking for your teeth. However, seeing as gang rivalries—despite their sadly high casualty rate—are essentially sophomoric nonsense and adolescent posturing, I feel the term is a good fit.
Note that the term itself does not in any way imply gangs as such. You would need to specify that that's what you're referring to by saying something like
There was a pissing match between rival gangs.