The abundances of carbon, oxygen, and iron in late-type stars are important parameters in exoplanetary and stellar physics, as well as key tracers of stellar populations and Galactic chemical evolution. However, standard spectroscopic abundance analyses can be prone to severe systematic errors, based on the assumption that the stellar atmosphere is one-dimensional (1D) and hydrostatic, and by ignoring departures from local thermodynamic equilibrium (LTE). In order to address this, we carried out three-dimensional (3D) non-LTE radiative transfer calculations for C I and O I, and 3D LTE radiative transfer calculations for Fe II, across the STAGGER-grid of 3D hydrodynamic model atmospheres. The absolute 3D non-LTE versus 1D LTE abundance corrections can be as severe as − 0.3 dex for C I lines in low-metallicity F dwarfs, and − 0.6 dex for O I lines in high-metallicity F dwarfs. The 3D LTE versus 1D LTE abundance corrections for Fe II lines are less severe, typically less than + 0.15 dex. We used the corrections in a re-analysis of carbon, oxygen, and iron in 187 F and G dwarfs in the Galactic disk and halo. Applying the differential 3D non-LTE corrections to 1D LTE abundances visibly reduces the scatter in the abundance plots. The thick disk and high-α halo population rise in carbon and oxygen with decreasing metallicity, and reach a maximum of [C/Fe] ≈ 0.2 and a plateau of [O/Fe] ≈ 0.6 at [Fe/H] ≈ −1.0. The low-α halo population is qualitatively similar, albeit offset towards lower metallicities and with larger scatter. Nevertheless, these populations overlap in the [C/O] versus [O/H] plane, decreasing to a plateau of [C/O] ≈ −0.6 below [O/H] ≈ −1.0. In the thin-disk, stars having confirmed planet detections tend to have higher values of C∕O at given [O/H]; this potential signature of planet formation is only apparent after applying the abundance corrections to the 1D LTE results. Our grids of line-by-line abundance corrections are publicly available and can be readily used to improve the accuracy of spectroscopic analyses of late-type stars.