We propose a scheme to dynamically synthesize a space-periodic effective magnetic field for neutral atoms by time-periodic magnetic field pulses. When atomic spin adiabatically follows the direction of the effective magnetic field, an adiabatic scalar potential together with a geometric vector potential emerges for the atomic center-of-mass motion, due to the Berry phase effect. While atoms hop between honeycomb lattice sites formed by the minima of the adiabatic potential, complex Peierls phase factors in the hopping coefficients are induced by the vector potential, which facilitate a topological Chern insulator. With further tuning of external parameters, both a topological phase transition and topological flat bands can be achieved, highlighting realistic prospects for studying strongly correlated phenomena in this system. Our Letter presents an alternative pathway towards creating and manipulating topological states of ultracold atoms by magnetic fields.