There are two main points: agreement and derivation.
Agreement: grammatical gender gives you an easy way to keep track of which word refers to which. Consider for example the following sentence:
- The clock fell over the glass table, and it broke.
What does “it” refer to? It’s ambiguous, it could be either “the clock” or “the glass table” (both things are breakable). In Portuguese however the sentence is completely unambiguous due to the gender system, as the translations show:
O relógio caiu sobre a mesa de vidro, e ele quebrou. // “ele” he/it = the clock
O relógio caiu sobre a mesa de vidro, e ela quebrou. // “ela” she/it = the table
It’s only one word of difference; however “ele” he/it must refer to “relógio” clock due to the gender agreement. Same deal with “ela” she/it and “mesa” table.
Latin also shows something similar, due to the syntactically free word order. Like this:
- puer bellam puellam amat. (boy.M.NOM pretty.F.ACC girl.F.ACC loves) = the boy loves the beautiful girl
- puer bellus puellam amat. (boy.M.NOM pretty.M.NOM girl.F.ACC loves) = the handsome boy loves the girl
Note how the adjective between “puer” boy and “puella” girl could theoretically refer to any of those nouns; Latin is not picky with adjective placement, as long as it’s near the noun it’s fine. However, because “puer” is a masculine word and “puella” is feminine, we know that the adjective refers to one if masculine, another if feminine. (Note: the case marks reinforce this, but they aren’t fully reliable.)
The second aspect that I mentioned is derivation: gender gives you a quick way to create more words, without needing new roots for that. Italian examples:
- “bambino” boy vs. “bambina” girl
- "gatto" cat, tomcat vs. “gatta” female cat
- "banana" banana (fruit) vs. “banano” banana plant
- "mela" apple (fruit) vs. “melo” apple tree
Focus on the last two lines - note how the gender system is reused to things that (from human PoV) are clearly have no sex, like hermaphrodite plants and their fruits.