As Flenyar quoted in his answer:
Each time he gains a new level, he chooses two classes, takes the best
aspects of each and applies them to his characteristic.
This implies that if one class would gain a BAB at it's respective level, you do as well. Note that unlike normal multiclass characters, your stats do depend on what order you take the classes in.
Notice how Flenyar's progression (6 levels of Fighter/Rogue, then 4 levels of Wizard/Rogue) gives a BAB of +9, but the following progression gives you a full BAB of +10, even though the character is still a Fighter 6/Wizard 4//Rogue 10:
- Fighter 1 / Rogue 1 (+1 [Fighters gain +1 every level])
- Fighter 2 / Rogue 2 (+1 [Fighters gain +1 every level])
- Fighter 3 / Rogue 3 (+1 [Fighters gain +1 every level])
- Fighter 4 / Rogue 4 (+1 [Fighters gain +1 every level])
- Fighter 5 / Rogue 5 (+1 [Fighters gain +1 every level])
- Wizard 1 / Rogue 6 (+1 [Rogues gain +1 at 6th level])
- Wizard 2 / Rogue 7 (+1 [Both Wizards and Rogues BAB improves])
- Wizard 3 / Rogue 8 (+1 [Rogues gain +1 at 8th level])
- Fighter 6 / Rogue 9 (+1 [Fighters gain +1 every level])
- Wizard 4 / Rogue 10 (+1 [Both Wizards and Rogues BAB improves])
Total BAB at level 10 is +10.
This means that even a Wizard//Sorcerer gestalt (or any other two low BAB classes) can have a perfect BAB if you take just one level of another perfect BAB class:
- Wizard 1 / Fighter 1 (+1 [Fighters gain +1 every level])
- Wizard 2 / Sorcerer 1 (+1 [Wizards gain +1 at 2nd level])
- Wizard 3 / Sorcerer 2 (+1 [Sorcerer gain +1 at 2nd level])
- Wizard 4 / Sorcerer 3 (+1 [Wizards gain +1 at 4th level])
- Wizard 5 / Sorcerer 4 (+1 [Sorcerer gain +1 at 4th level])
- Wizard 6 / Sorcerer 5 (+1 [Wizards gain +1 at 6th level])
- Wizard 7 / Sorcerer 6 (+1 [Sorcerer gain +1 at 6th level])
- Wizard 8 / Sorcerer 7 (+1 [Wizards gain +1 at 8th level])
- Wizard 9 / Sorcerer 8 (+1 [Sorcerer gain +1 at 8th level])
- Wizard 10 / Sorcerer 9 (+1 [Wizards gain +1 at 10th level])
Total BAB at level 10 for this Wizard 10//Fighter 1/Sorcerer 9 is +10 (perfect.) This cannot be determined without the order of the levels taken.
...the DM may overrule this, based on the wording of this rule:
Base Attack Bonus: Choose the better progression from the two classes. (Emphasis mine.)
It is conceivable, then, that the Wizard 10//Fighter 1/Sorcerer 9 is a character with 1 level of perfect BAB progression (+1) and 9 levels of low BAB progression (+4), leaving him with only a BAB of +5.
I'm not sure of any official errata on the matter, but it makes a big difference in some cases. Ask your DM, or make sure your players know your ruling if you are the DM. Personally, I would stick with the latter "better progression" rule over the "better increase" rule, since it seems to be the intent of gestalt.
There is also the "Fractional Base Bonuses" house rule, presented on Unearthed Arcana p.73, which is designed to allow smooth leveling of gestalt multiclass characters without any of these exploitable loopholes.
Since you mentioned saves in your comment, I'll touch on it briefly:
Saves would indeed work the same was as BAB, but beware that they are even easier to inflate artificially if you use the first presented "better increase" rule. This is because at first level of every class with good saves, that save "increases" from +0 to +2. Therefore it's even easier to end up with ridiculously high saves through multiclassing gestalt, if you don't simple lump all progression levels together before calculating character stats.
As a side note, consider two classes which gain 1d6 sneak attack every other level. Staggering them as I suggest staggering BAB increases still cannot double your sneak attack damage, since the book explicitly states:
Class features that two classes share accrue at the rate of the faster class.