It is a surname of Spanish origin. Originally from Álava. According to some texts, it means "sons of Gamo", a common masculine name of the Middle Ages. If we take into account the Basque language (Basque), it means pastal, pasture.
This version is not from Spanish but the one used in languages that do not have graphic accents such as to write Gámez, which is probably an adaptation of the more common one in Portuguese da Gama. I can also find it written like this on the web, where written accents are usually omitted.
Gamez, is a surname of Spanish origin. It is believed to have originated from the Spanish surname Agamez.