In order to enable massive machine-to-machine (M2M) communication in Long Term Evolution-Advanced (LTE-A) cellular network, a machine-type communication gateway (MTCG) is introduced to solve the issue of control signaling overheads. In this paper, a power allocation algorithm based on the method of Lagrange multipliers is proposed for massive M2M communication over LTE-A cellular uplink. The proposed algorithm can decrease the signaling overheads by enabling the machine-type communication device (MTCD) to access the base station (BS) via a MTCG that collects the data from a group of M2M devices and forward it to the BS. The core objective of the proposed algorithm is to maximize the total energy efficiency of a group of M2M devices, while satisfying the time delay of the M2M devices, by coordinating the power transmission of the MTCDs and the MTCG. The simulation results demonstrate that the proposed algorithm outperforms the heuristic algorithm and has relatively close performance to the optimal design.