"Oh. Yeah. That's it. I'll call in the troops, you wonder where Perry is."
The Gang is a group formed by Phineas, Ferb and their friends. The group began to consolidate in the second season, and then became fully consolidated in the third season, and the main members of the gang are Phineas, Ferb, Isabella, Buford and Baljeet, with occasional participation of the Fireside Girls and Irving, but very rarely with other characters (ex.: Jeremy and Django).
In the first season, is rare to see the whole gang together; generally, Phineas and Ferb act alone, often with the help of Isabella (as in "Rollercoaster") and, sometimes, of the Fireside Girls (as in "Lawn Gnome Beach Party of Terror"). Occasionally they also tend to do their projects with Baljeet in a few episodes (as in "Unfair Science Fair"), and the same with Buford (as in "Raging Bully").
In the second season, the Gang is seen as a more consolidated group of friends, of which Isabella, Buford and Baljeet are the most prominent friends of Phineas and Ferb, who begin to spend more time with them. The Fireside Girls still continue to appear occasionally as an aid to their adventures, although they are not as prominent as the aforementioned friends. It was also introduced Irving, and his appearances in some Gang's adventures (as in "Hide and Seek"), make him a particular addition to the Gang's dynamics, being a huge fan of the Flynn-Fletcher stepbrothers.
Seasons 3 and 4
In the last seasons, the Gang is completely consolidated, and it is rare to see an episode in which Phineas and Ferb aren't with Isabella, Buford and Baljeet, now and forever their closest friends; generally the five kids appear and work together in almost all the episodes in those seasons. Also, Irving appears more in those seasons, making him as prominent as the Fireside Girls, but, like them, not so prominent to be a main member of the Gang as the aforementioned five kids.