Yes, of course, you're not visiting the moon or Antarctica you know, LOL! More than half of the world's biggest labs are headquartered here in Europe anyway.
When in Barcelona, just head to any pharmacy and ask for it, also in English -most staff can manage, even if basic English. As far as I know, you can find it in ointment/cream but also in liquid, I guess it depends on what you want it for. Brands like Eucerin, Biretix, Caudalié... Just take a pic of the composition of your favourite brand and I am sure the pharmacist will be able to find it -or something close to it.
Good to know as well that there are hundreds of pharmacists in the city, just look for a red (or green) cross -like this, or ask for directions to the closest one. You won't have to walk more than a few hundred yards to find one, regardless where you are in the city. You will also find it in beauty shops if it's not considered a medicine/drug -which I don't know, sorry- in which case only pharmacists would be able to sell it. And again, plenty of beauty shops around, some from big chains too, some international brands (Sephora, L'Occitane, Mary Kay...)
Enjoy!