"y gwers" was wrong, why does the letter G vanish?
This is due to a soft mutation, where the initial g- vanishes. Y ('the') causes weak soft mutation of feminine nouns. Gwers is a feminine noun.
'Weak' soft mutation means that words beginning with the letters ll- or rh- resist the mutation.
Why isn't it "yr wers"?
The -w- here in gwe- has a consonant quality as in the English 'was' or 'weather', so it is preceded by y rather than yr.