Tungsten disulfide (WS2) is promising for potential applications in transistors and gas sensors due to its high mobility and high adsorption of gas molecules onto edge sites. This work comprehensively studied the deposition temperature, growth mechanism, annealing conditions, and Nb doping of WS2 to prepare high-quality wafer-scale N- and P-type WS2 films by atomic layer deposition (ALD). It shows that the deposition and annealing temperature greatly influence the electronic properties and crystallinity of WS2, and insufficient annealing will seriously reduce the switch ratio and on-state current of the field effect transistors (FETs). Besides, the morphologies and carrier types of WS2 films can be controlled by adjusting the processes of ALD. The obtained WS2 films and the films with vertical structures were used to fabricate FETs and gas sensors, respectively. Among them, the Ion/Ioff ratio of N- and P-type WS2 FETs is 105 and 102, respectively, and the response of N- and P-type gas sensors is 14% and 42% under 50 ppm NH3 at room temperature, respectively. We have successfully demonstrated a controllable ALD process to modify the morphology and doping behavior of WS2 films with various device functionalities based on acquisitive characteristics.