Guacamole dates back to the 1500s. It was invented by the Aztecs, and they used avocados and other ingredients we still use today. The popular dip was called "ahuaca-mulli" which translates to "mixture of avocado".
The Spaniards liked guacamole and decided to take the idea from the Aztecs. Due to the scarcity of avocados in Europe, this was difficult to recreate. They tried different substitutions for avocados. The Spanish could not quite get the same flavor.
The word comes from "waka'mole" from the language of Nahuatl from central Mexico. Today, we call it guacamole and it is often shortened to guac.