In this paper, we study the sum-rate maximization problem in a single-cell massive MIMO downlink system with K users. Unlike the conventional sum-power constraint (SPC) that limits the total average power over all the transmit antennas, the more practical per-antenna power constraint (PAPC) is considered. A precoding scheme based on the principle of equal gain transmission (EGT) is proposed to satisfy any given PAPC with low complexity. We show that as the number of transmit antennas goes to infinity, the gap between the sum-rate achieved by our proposed scheme under PAPC and that under a single SPC achieved with optimal maximum ratio transmission (MRT) approaches k log2(4/π) in bits/sec/Hz under the condition of independent Rayleigh fading of the user channels. The analytical results are also verified by numerical examples. Therefore, in massive MIMO systems, our proposed EGT-based precoding scheme is near-optimal under PAPC with asymptotically negligible capacity loss compared against the sum-rate upper bound by the MRT-based precoding under the relaxed SPC, which justifies the use of PAPC in practical massive MIMO systems.