Magnetic fields are frequently compared to gravitational fields. Gravitational fields cause a curvature of space-time. That curvature of space-time provides a mechanism for the gravitational attraction between masses. A magnet also causes a curvature of space-time.  In  fact  a  magnet  can  cause  space-time  curvature  in  several  distinct ways.

                                                                                                                                                                                                                                                                     

A magnet has mass which will exert gravitational attraction and therefore curve space-time. Furthermore, a magnet produces a magnetic field which has both energy and momentum. Momentum can be demonstrated by the fact that a magnet will produce a force on charged particles, another magnet, or ferromagnetic materials. Both energy and momentum add to a gravitational field in the same way as mass. Therefore the magnetic field itself causes a gravitational field which will produce space-time curvature in addition to the curvature caused by the mass of the magnet.




 However, the gravitational field and consequent gravitational attraction exerted by a magnet and its magnetic field aren't strong enough to play much of a role in how magnets attract (let alone repel) other objects. (http://www.sciam.com/askexpert_question.cfm/articleID=000245A8-3-1C71-84A...)

 

One difference between gravitational and electromagnetic fields is that electromagnetic fields can both attract and repel whereas gravitational fields only act in one direction. Virtual photons can cause both attractive and repulsive forces between charges by the transfer of momentum http://math.ucr.edu/ home/baez/physics/Quantum/virtual_particles.html. However, both mass and energy contribute to gravitational fields. Dark energy is reported to exert an anti-gravity force (Scientific American  February 2007). This supposed anti-gravity force might (or might not) parallel the repulsive magnetic force.