Quote Originally Posted by Fluttershy View Post
or is it just a phrase expressing surprise with no meaning?
Yes, it expresses a (usually unpleasant) surprise.

Originally, it was a euphemism of «ёб твою мать» (literally: “(I have) fucked your mother”) which can also express an unpleasant surprise but has even wider semantic field.