The first intuitive answer would be that the Borg got Latin from somebody who speaks Latin. But people who speak Latin are slightly more rare in Star Trek than they are in the real world.

However, any significant Federation computer should contain all the vocabulary and syntax of all known languages (the universal translator works much more efficiently when it knows what it's talking about). Throughout their conquests in the Alpha Quadrant they would have assimilated the data banks of at least one computer that knew how to speak Latin.

carpe mentem