several things could be causing this--sometimes the head position when you are on the mri scan table puts stress on the neck causing neck pain (patients have complained to me about this). there are 2 nerves in the back of the head called the greater occipital nerves. these nerves can be compressed when your head is laying on a hard surface and cause fairly severe pain as well. there are not any serious problems inside the head (like brain problems) that would cause this. the magnetic field from the mri scan is not strong enough to directly influence the brain or pain fibers. if dye is involved you could be allergic to it!
what could be causing severe pain in the back of my head when i get an mri?