  The extragalactic $\gamma$-ray background (EGB) arises from the accumulation
of $\gamma$-ray emissions from resolved and unresolved extragalactic sources as
well as diffuse processes. It is important to study the statistical properties
of the EGB in the context of cosmological structure formation. Known
astrophysical $\gamma$-ray sources such as blazars, star-forming galaxies, and
radio galaxies are expected to trace the underlying cosmic matter density
distribution. We explore the correlation of the EGB from Fermi-LAT data with
the large-scale matter density distribution from the Subaru Hyper Suprime-Cam
(HSC) SSP survey. We reconstruct an unbiased surface matter density
distribution $\kappa$ at $z<1$ by applying weak-gravitational lensing analysis
to the first-year HSC data. We then calculate the $\gamma - \kappa$
cross-correlation. Our measurements are consistent with a null detection, but a
weak correlation is found at angular scales of 30-60 arcmin, especially when
distant source galaxies at $z > 1$ are used for the lensing $\kappa$
reconstruction. The large-scale correlation suggests strong clustering of
high-redshift $\gamma$-ray sources such as blazars. However, the inferred bias
factor of $4-5$ is larger by about a factor of two than results from other
clustering analyses. The final HSC data covering 1,400 squared degrees will
play an essential role to determine accurately the blazar bias at $z > 0.5$.
