The production of the $eta_c (1S)$ state in proton-proton collisions is probed via its decay to the $p bar{p}$ final state with the LHCb detector, in the rapidity range $2.0 < y < 4.5$ and in the meson transverse-momentum range $p_T > 6.5$ GeV/c. The cross-section for prompt production of $eta_c (1S)$ mesons relative to the prompt $J/psi$ cross-section is measured, for the first time, to be $sigma_{eta_c (1S)}/sigma_{J/psi} = 1.74 pm 0.29 pm 0.28 pm 0.18 _{B}$ at a centre-of-mass energy $sqrt{s} = 7$ TeV using data corresponding to an integrated luminosity of 0.7 fb$^{-1}$, and $sigma_{eta_c (1S)}/sigma_{J/psi} = 1.60 pm 0.29 pm 0.25 pm 0.17 _{B}$ at $sqrt{s} = 8$ TeV using 2.0 fb$^{-1}$. The uncertainties quoted are, in order, statistical, systematic, and that on the ratio of branching fractions of the $eta_c (1S)$ and $J/psi$ decays to the $p bar{p}$ final state. In addition, the inclusive branching fraction of $b$-hadron decays into $eta_c (1S)$ mesons is measured, for the first time, to be $B ( b rightarrow eta_c X ) = (4.88 pm 0.64 pm 0.29 pm 0.67 _{B}) times 10^{-3}$, where the third uncertainty includes also the uncertainty on the $J/psi$ inclusive branching fraction from $b$-hadron decays. The difference between the $J/psi$ and $eta_c (1S)$ meson masses is determined to be $114.7 pm 1.5 pm 0.1$ MeV/c$^2$.