[Shameless comm advertisement: make sure to check !linguistics@lemmy.ml, this sort of question fits nicely there!]
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) have no sex or social gender, like trees and their fruits. This kind of extension of the derivation system is fairly common across gendered languages.
Addressing some comments here: English does not have a grammatical gender system. It has a few words that refer to social gender and sex, but both concepts (grammatical gender and social gender) are completely distinct.
That's specially evident when triggering agreement in a gendered language, as English doesn't do anything similar. Portuguese examples, again:
- [Sentence] O Ivan é uma pessoa muito alta.
- [Gloss, showing word gender] The.M Ivan.M is a.F person.F very tall.F
- [Translation] Ivan is a very tall person.
Check the adjective, "alta" tall. Even if "Ivan" refers to a man, you need to use the feminine adjective here, because it needs to agree with "pessoa" person - a feminine word. This kind of stuff happens all the time in gendered languages, but you don't see it e.g. in English.