Gates allow Drones to consume berries to upgrade to a warrior or acquire buffs. Once you enter a gate by standing in front of it, you can select which of the two options offered you prefer by moving left or right. (Jumping will lock your choice.) Without this, the drone has no combat capabilities, and can only throw berries defensively (Or attempt to bounce the enemy around before dying).
The gate must be either neutral (gray colored) or tagged for you team (blue or gold). When a queen touches a gate, if it isn't already their color, it will be changed to that color, so be sure to communicate to your queen what gate you want!