The electromagnetic field tensor $F_{\mu\nu}$ which encodes all the information about the electric and magnetic field, certainly contributes to the energy-stress tensor $T_{\mu\nu}$, which appears in the Einstein Field Equations: $$G_{\mu\nu}= 8\pi G T_{\mu\nu}$$ The left hand side of this equation encodes the geometry of spacetime, while the right hand side describes the 'sources'of'sources' of gravity. Therefore, we can say that magnetism does have an effect on the geometry of spacetime i.e. gravity.