Note that this procedure amounts to assuming that the electromagnetic field, but not the gravitational field, is "weak". Sometimes we can go even further; if the gravitational field is also considered "weak", we can independently solve the linearised Einstein field equations and the (flat spacetime) Maxwell equations on a Minkowksi vacuum background. Then the (weak) metric tensor gives the approximate geometry; the Minkowski background is unobservable by physical means, but mathematically much simpler to work with, whenever we can get away with such a sleight-of-hand.