Can electromagnetic waves be affected by gravity? Can electromagnetic waves change their properties in the presence of gravity?
Yes (and somewhat No apparently too)
If you follow Einstein's theory of general relativity then gravity has no direct effect on electromagnetic waves itself.
Gravity however affects space time itself warping it towards the gravity source. Thus any electromagnetic wave passing close enough to the gravity source will bend towards that source when observed from the outside.
From the point of the wave however, it follows a straight path and is not affected by gravity at all.
If you mix in quantum theory, it's getting even more weird, because suddenly parts that work well for general relativity no longer work within the quantum model. This is part of current research in physics to bring general relativity and quantum theory into alignment.