We propose an atomistic model of electromigration (EM) in metals based on a recently developed phase-field-crystal (PFC) technique. By coupling the PFC model's atomic density field with an applied electric field through the EM effective charge parameter, EM is successfully captured on diffusive time scales. Our framework reproduces the well-established EM phenomena known as Black's equation and the Blech effect, and also naturally captures commonly observed phenomena such as void nucleation and migration in bulk crystals. A resistivity dipole field arising from electron scattering on void surfaces is shown to contribute significantly to void migration velocity. With an intrinsic time scale set by atomic diffusion rather than atomic oscillations or hopping events, as in conventional atomistic methods, our theoretical approach makes it possible to investigate EM-induced circuit failure at atomic spatial resolution and experimentally relevant time scales.