This paper deals with the problem of maximizing the spectral efficiency in a massive multi-user MIMO downlink system, where a base station is equipped with a very large number of antennas and serves single-antenna users simultaneously in the same frequency band, and the beamforming training scheme is employed in the time-division duplex mode. An optimal resource allocation that jointly selects the training duration on uplink transmission, the training signal power on downlink transmission, the training signal power on uplink transmission, and the data signal power on downlink transmission is proposed in such a way that the spectral efficiency is maximized given the total energy budget. Since the spectral efficiency is the main concern of this work, and its calculation using the lower bound on the achievable rate is computationally very intensive, in this paper, we also derive approximate expressions for the lower bound of achievable downlink rate for the maximum ratio transmission (MRT) and zero-forcing (ZF) precoders. The computational simplicity and accuracy of the approximate expressions for the lower bound of achievable downlink rate are validated through simulations. By employing these approximate expressions, experiments are conducted to obtain the spectral efficiency of the massive MIMO downlink time-division duplexing system with the optimal resource allocation and that of the beamforming training scheme. It is shown that the spectral efficiency of the former system using the optimal resource allocation is superior to that yielded by the latter scheme in the cases of both MRT and ZF precoders.