You must have activated the Pimping mission (which of course happens as Pimping is needed for 100%). Activating and deactivating Pimping will make the Ballas dislike CJ, meaning they will no longer shoot you on sight whenever you are cruising around their territory. Make note that Ballas still dislike CJ after doing this, which means whenever CJ is lurking around Ballas' territory, any nearby Ballas will still follow him around for a few seconds, doing hand gestures and insulting him, before shooting him. CJ's outfit doesn't have to do anything with Ballas' hostility towards him.
In the beginning, Ballas dislike CJ (as stated, they will follow him around doing hand gestures and badmouthing him).
After the mission Drive-By, Ballas hate CJ, which means they will shoot you on sight whenever you are cruising around their territory.
When doing Pimping mission, Ballas like CJ (they will act friendly towards CJ no matter what you do -- when you punch them, they would run away, same as when you punch GSF members). Though deactivating the mission will make them dislike CJ instead of hate. Ballas is the only gang affected by this.