We present results from the NIRVANDELS survey investigating the gas-phase metallicity (Zgas, tracing O/H) and stellar metallicity (Z⋆, tracing Fe/H) of 33 star-forming galaxies at redshifts 2.95<z<3.80. Based on a combined analysis of deep optical and near-IR spectra, tracing the rest-frame far ultraviolet and rest-frame optical respectively, we present the first simultaneous determination of the stellar and gas-phase mass-metallicity relationships (MZRs) at z≃3.4. In both cases, we find that metallicity increases with increasing stellar mass (M⋆), and that the power-law slope at M⋆≲1010M⊙ of both MZRs scales as Z∝M⋆0.3. Comparing the stellar and gas-phase MZRs, we present direct evidence for super-solar O/Fe ratios (i.e., α-enhancement) at z>3, finding (O/Fe)≃(2.54±0.38)×(O/Fe)⊙, with no clear dependence on M⋆.