Picking up the Gunpowder Barrels will only make the gangs aggro if they are very close to the barrel, but we suggest you choose one gang at a time to beat up. That way you do not become aggro to every thug in town at the same time.