  We present $\gamma$-ray optical-depth calculations from a recently published
extragalactic background light (EBL) model built from multiwavelength galaxy
data from the Hubble Space Telescope Cosmic Assembly Near-Infrared Deep
Extragalactic Legacy Survey (HST/CANDELS). CANDELS gathers one of the deepest
and most complete observations of stellar and dust emissions in galaxies. This
model resulted in a robust derivation of the evolving EBL spectral energy
distribution up to $z\sim 6$, including the far-infrared peak. Therefore, the
optical depths derived from this model will be useful for determining the
attenuation of $\gamma$-ray photons coming from high-redshift sources, such as
those detected by the Large Area Telescope on board the Fermi Gamma-ray Space
Telescope, and for multi-TeV photons that will be detected from nearby sources
by the future Cherenkov Telescope Array. From these newly calculated optical
depths, we derive the cosmic $\gamma$-ray horizon and also measure the
expansion rate and matter content of the Universe including an assessment of
the impact of the EBL uncertainties. We find $H_{0}=61.9$ $^{+2.9}_{-2.4}$ km
s$^{-1}$ Mpc$^{-1}$ when fixing $\Omega_{m}=0.32$, and $H_{0}=65.6$
$^{+5.6}_{-5.0}$ km s$^{-1}$ Mpc$^{-1}$ and $\Omega_{m}=0.19\pm 0.07$, when
exploring these two parameters simultaneously.
