  The afterglow emission from gamma-ray bursts (GRBs) is believed to originate
from a relativistic blast wave driven into the circumburst medium. Although the
afterglow emission from radio up to X-ray frequencies is thought to originate
from synchrotron radiation emitted by relativistic, non-thermal electrons
accelerated by the blast wave, the origin of the emission at high energies (HE;
$\gtrsim$~GeV) remains uncertain. The recent detection of sub-TeV emission from
GRB~190114C by MAGIC raises further debate on what powers the very high-energy
(VHE; $\gtrsim 300$GeV) emission. Here, we explore the inverse Compton scenario
as a candidate for the HE and VHE emissions, considering two sources of seed
photons for scattering: synchrotron photons from the blast wave (synchrotron
self-Compton or SSC) and isotropic photon fields external to the blast wave
(external Compton). For each case, we compute the multi-wavelength afterglow
spectra and light curves. We find that SSC will dominate particle cooling and
the GeV emission, unless a dense ambient infrared photon field, typical of
star-forming regions, is present. Additionally, considering the extragalactic
background light attenuation, we discuss the detectability of VHE afterglows by
existing and future gamma-ray instruments for a wide range of model parameters.
Studying GRB~190114C, we find that its afterglow emission in the \fermi-LAT
band is synchrotron-dominated.The late-time \fermi-LAT measurement (i.e.,
$t\sim 10^4$~s), and the MAGIC observation also set an upper limit on the
energy density of a putative external infrared photon field (i.e. $\lesssim
3\times 10^{-9}\,{\rm erg\,cm^{-3}}$), making the inverse Compton dominant in
the sub-TeV energies.
