  Based on first-principles calculations, we discover a two-dimensional layered
antiferromagnetic (AFM) electride Gd$_2$O, where anionic excess electrons exist
in the interstitial spaces between positively charged cationic layers. It is
revealed that each cationic layer composed of three-atom-thick Gd$-$O$-$Gd
stacks has in-plane ferromagnetic and out-of-plane AFM superexchange
interactions between the localized Gd 4$f$ spins through O 2$p$ orbitals.
Furthermore, the interlayer superexchange mediated by the hybridized Gd-5$d$
and interstitial-$s$-like states involves intimate couplings between the spin,
lattice, and charge degrees of freedom, thereby inducing simultaneous magnetic,
structural, and electronic phase transitions. The resulting ground state with
the simple hexagonal lattice hosts massless Dirac fermions protected by
nonsymmorphic magnetic symmetry, as well as massive Dirac fermions. We thus
demonstrate that the anionic excess electrons in Gd$_2$O play a crucial role in
the emergence of magnetic Dirac semimetal states, therefore offering an
intriguing interplay between 2D magnetic electrides and topological physics.
