Basque mahats 'grape' derives from an earlier *bak-atś, with nasalization of the initial labial and lenition *-k- > -h- (Martinet's Law)2. The second member of the compound is a phytonym suffix *-ats found in other words such as e.g. (g)isats 'broom'. We've got also Galician-Portuguese bago 'grape' (also found in parts of Leonese) from an unattested masculine variant of Latin bāca 'berry'1.
The Latin word has no IE etymology, but Boutkan-Kossmann have proposed a link to Berber *bqā 'blackberry, mulberry'3. In my opinion, this would be a Wanderwort also found in Kartvelian *maqˀw-/*muqˀw- 'blackberry' (Georgian maqˀv-al-, Megrel muʔ-, Svan muqˀw, Laz muqˀ-)4 and possibly also Burushaski *maɣar- 'unripe mulberry', Lezghian *niwqˀ:a(j) and Lak qˀul-nuqˀi 'strawberry'.
_______________________________
1 There's
also Hispanic Latin bacca 'wine' (Varron).
2 Unfortunately, academic Vascologists think the only source of -h- can be a nasal *-n- (Mitxelena's
Law), so they reconstruct a protoform *banatś (Trask), or even worse, from Romance banasta 'basket' (Manterola).
3 D.
Boutkan & M. Kossmann (1999): Some
Berber Parallels of European Substratum Words, §3.1, in JIES 27,
p. 87-100.
4 Borrowed
into Akhvakh muqˀ:ali.