Defect physics of europium (Eu) doped GaN is investigated using first-principles hybrid density-functional defect calculations. This includes the interaction between the rare-earth dopant and native point defects (Ga and N vacancies) and other impurities (O, Si, C, H, and Mg) unintentionally present or intentionally incorporated into the host material. While the trivalent ${\mathrm{Eu}}^{3+}$ ion is often found to be predominant when Eu is incorporated at the Ga site in wurtzite GaN, the divalent ${\mathrm{Eu}}^{2+}$ is also stable and found to be predominant in a small range of Fermi-level values in the band-gap region. The ${\mathrm{Eu}}^{2+}$/${\mathrm{Eu}}^{3+}$ ratio can be tuned by tuning the position of the Fermi level and through defect association. We find co-doping with oxygen can facilitate the incorporation of Eu into the lattice. The unassociated ${\mathrm{Eu}}_{\mathrm{Ga}}$ is an electrically and optically active defect center and its behavior is profoundly impacted by local defect-defect interaction. Defect complexes such as ${\mathrm{Eu}}_{\mathrm{Ga}}\text{\ensuremath{-}}{\mathrm{O}}_{\mathrm{N}}$, ${\mathrm{Eu}}_{\mathrm{Ga}}\text{\ensuremath{-}}{\mathrm{Si}}_{\mathrm{Ga}}$, ${\mathrm{Eu}}_{\mathrm{Ga}}\text{\ensuremath{-}}{\mathrm{H}}_{i}$, ${\mathrm{Eu}}_{\mathrm{Ga}}\text{\ensuremath{-}}{\mathrm{Mg}}_{\mathrm{Ga}}$, and ${\mathrm{Eu}}_{\mathrm{Ga}}\text{\ensuremath{-}}{\mathrm{O}}_{\mathrm{N}}\text{\ensuremath{-}}{\mathrm{Mg}}_{\mathrm{Ga}}$ can efficiently act as deep carrier traps and mediate energy transfer from the host into the ${\mathrm{Eu}}^{3+}\phantom{\rule{4pt}{0ex}}4f$-electron core which then leads to sharp red intra-$f$ luminescence. Eu-related defects can also give rise to defect-to-band luminescence. The unassociated ${\mathrm{Eu}}_{\mathrm{Ga}}$, for example, is identified as a possible source of the broad blue emission observed in $n$-type, ${\mathrm{Eu}}^{2+}$-containing GaN. This work calls for a re-assessment of certain assumptions regarding specific defect configurations previously made for Eu-doped GaN and further investigation into the origin of the photoluminescence hysteresis observed in (Eu,Mg)-doped samples.