Gravitational fields are determined only by the mass ( or mass-energy) of a body. Charged and uncharged massive particles produce the same gravitational field pound for pound ( well...the electromagnetic energy has its own mass so it does contribute a bit ). magnetic fields are produced by charged particles in motion, and depend on the charge and velocity of these particles, but not on their mass. Magnetic fields are 'polar' fields with a North and South polarity. Gravitational fields have no polarity at all. At large distances, gravitational fields diminish as the inverse square of distance from their source. Magnetic fields at large distances from their source, decrease as the inverse cube of the distance. You can only detect magnetic fields by using charged particles to measure their deflection. Gravitational fields can be detected by using anything to measure a change in velocity.