Galician is a sort of half-way house between Portuguese and Castilian. Back in the times of the Cantigas de Sta Maria, Galicians and Portuguese used the same language, but the Portuguese deliberately accentuated the differences with Spain, so they drifted apart. Galician has the same definite articles for instance, and, yes, the 'x' is as in Portuguese, though Galician has the Castilian lisp. But it doesn't have the peculiarities of Portuguese like final 's' as 'sh' which makes Portuguese harder to understand (at least for me
) than Castilian. Personally, I find spoken Galician much easier to understand than Portuguese - tho I'm afraid I know nothing about the Brazilian version. And no doubt if I spent any great time in Portugal, I would soon get used to the lingo.
As Ivar suggests, try the TV or radio, tho I suspect if they think you're a foreigner Galicians will address you in Castilian anyway, not Galician
Topographically and climatically, Galicia belongs with N Portugal, not Spain. I suspect if it hadn't been for the cult of Santiago making Galicia central to the Spanish identity, Galicia might well be part of Portugal today
Oh, and in Galician it's Galego - Gallego is the Castilian spelling