Superconductivity of transition metal dichalcogenide $1T$-TiTe$_2$ under high pressure was investigated by the first-principles calculations. Our results show that the superconductivity of $1T$-TiTe$_2$ exhibits very different behavior under the hydrostatic and uniaxial pressure. The hydrostatic pressure is harmful to the superconductivity, while the uniaxial pressure is beneficial to the superconductivity. Superconducting transition temperature $T_C$ at ambient pressure is 0.73 K, and it reduces monotonously under the hydrostatic pressure to 0.32 K at 30 GPa. While the $T_C$ increases dramatically under the uniaxial pressure along $c$ axis. The established $T_C$ of 6.34 K under the uniaxial pressure of 17 GPa, below which the structural stability maintains, is above the liquid helium temperature of 4.2 K. The increase of density of states at Fermi level, the redshift of $F(omega)$/$alpha^2F(omega)$ and the softening of the acoustic modes with pressure are considered as the main reasons that lead to the enhanced superconductivity under uniaxial pressure. In view of the previously predicted topological phase transitions of $1T$-TiTe$_2$ under the uniaxial pressure [Phys. Rev. B 88, 155317 (2013)], we consider $1T$-TiTe$_2$ as a possible candidate in transition metal chalcogenides for exploring topological superconductivity.