i would still have to use less speed evs because my set aims to beat 8 speed suicune so i believe i should be removing 8 speed evs and placing them into defense. the majority of gligar run less than 8 speed by the way, very few on the ladder run 52 (and i really never heard of running 52 speed on gligar until you said so). aiming for blastoise is still not a bad idea but if you go for blastoise i would be tempted to add just a tad more to beat milotic (so she cannot toxic you) and then by then i feel like i should go all the way up to suicune again.
the thing about walrein is that all he asks for is one chance to set up - just one - and by then if the conditions are right he can sap, easily, 100 or 200 or 300 or even more percents worth of damage. and unlike sweepers doing that much damage that damage is pretty much guaranteed. by investing more in speed you allow more chances to set up which means more chances to inflict large damage.
you still can set up on relatively strong attacks like flygon's outrage or an psychic from azelf while no matter how much you invest in defense you won't be able to take the obscenely strong ones (like lo darmanitan). there is nothing specific the extra defense evs gives to you while there are useful things investing in speed does for you.