Two-dimensional (2D) platinum diselenide (PtSe$_2$) has received significant attention for 2D transistor applications due to its high mobility. Here, using molecular beam epitaxy, we investigate the growth of 2D PtSe$_2$ on highly oriented pyrolytic graphite (HOPG) and unveil their electronic properties via X-ray photoelectron spectroscopy, Raman spectra, and scanning tunnelling microscopy/spectroscopy as well as density functional theory (DFT) calculations. PtSe$_2$ adopts a layer-by-layer growth mode on HOPG and shows a decreasing band gap with increasing layer number. For the layer numbers from one to four, PtSe$_2$ has band gaps of $2.0 pm 0.1$, $1.1 pm 0.1$, $0.6 pm 0.1$ and $0.20 pm 0.1$ eV, respectively, and becomes semimetal from the fifth layer. DFT calculations reproduce the layer-dependent evolution of both the band gap and band edges, suggest an indirect band-gap structure, and elucidate the underlying physics at the atomic level.