  Photon-axion-like particle (ALP) oscillations result in the survival of gamma
rays from distant sources above TeV energies. Studies of events observed by
CAST, Fermi-LAT, and IACT have constrained the ALP parameters. We investigate
the effect of photon-ALP oscillations on the gamma-ray spectra of the first
extragalactic neutrino source, TXS 0506+056, for observations by Fermi-LAT and
MAGIC around the IC170922-A alert. We obtain a constraint on the ALP coupling
parameter $g_{a\gamma} < 5 \times 10^{-11}$ GeV$^{-1}$ with 95% C.L. when
focusing on the ALP mass range 0.1 neV $\le$ $m_a$ $\le$ 1000 neV. Importantly,
we study the implications of ALP-$\gamma$ oscillations on the counterpart
$\gamma$ rays of the sub-PeV neutrinos observed from TXS 0506+056. We also show
the diffuse $\gamma$-ray fluxes and observabilities from flat-spectrum radio
quasars, high-synchrotron peaked sources, and low-intermediate-synchrotron
peaked sources, assuming similar gamma-ray emissions as that from TXS 0506+056.
