In this paper, we address the energy-efficient power allocation problem for energy-harvesting device-to- device (EH-D2D) communications, which enable user equipments (UEs) to harvest energy from ambient environments. The challenge is how to optimize energy efficiency (EE) with the intermittent and dynamic characteristics of energy arrivals. We model the offline power allocation problem as a non- cooperative game over a finite horizon. Various practical constraints such as circuit power consumption, energy causality, battery capacity, quality of service (QoS), and maximum transmission power have been taken into consideration. A low- complexity iterative power allocation algorithm is developed by exploiting properties of non-linear fractional programming and Lagrange dual decomposition. Simulation results demonstrate that the proposed algorithm outperforms the power-greedy algorithm by 55% and 84% for D2D and cellular UEs, respectively.