The letter 'g' makes three different sounds, depending on the surrounding sounds. It makes a sound similar to the English 'g', as in 'sugar' in only some environments, but especially after 'n', like in 'venga'. Before an 'i' or an 'e', as in the word 'gente', it's different, just like the 'j' in 'jamón'; or something like a hard 'h' sound in English, with some constriction at the back of your tongue; or German 'ch' in 'machen' or 'Bach'. Anywhere else, especially (but not limited to) between vowels, as in this case, it's pronounced similar to the 'j' sound in 'jamón', but with the vocal chords vibrating; like the Modern Greek 'γ' in 'γάλα'; something similar to the English 'g' in 'sugar', but with the air free-flowing and continuous, so it might be hard to hear. If you've studied phonetics, the international phonetic alphabet symbols for the three sounds are [g], [x], and [ɣ], respectively. By the way, the Spanish 'b/v' and 'd' also make special sounds in this last environment (between vowels, etc.). The 'b' in 'abuela' or the 'v' in 'uva' make a sound somewhat like a 'v' in English, but with both lips almost touching, instead of your top teeth touching your bottom lip. Both 'd' sounds in 'ciudad' are pronounced similar to the English 'th' in 'this'. Sorry if this is all confusing or if some of my examples are meaningless, but it's hard to describe in terms of English, due to its lack of some of these sounds, or without being too technical, and I also don't know what languages you're familiar with. I hope this helps a bit.
Just remember that the '-es' plural ending gets attached to nouns ending in a consonant (e.g. ciudad > ciudades; profesor > profesores), so you'll know it comes from 'mes' (you wouldn't analyze the plural as just '-s', since there's no Spanish word 'mese' as far as I know). As for 'mesas', take off the plural '-s' and you're left with 'mesa', which is the origin of the word 'mesa' in English, meaning a raised, flat, table-like landform.