Wireless sensor networks (WSNs), which provide perception services for the Internet of Things (IoT) infrastructure, usually suffer from constrained energy resources. However, the fact that the data collected by WSNs often exhibit spatial-temporal correlation leads to the waste of energy. In addition, load imbalance among sensor nodes also makes energy efficiency low. To this end, a novel energy-efficient approach based on clustering using gray prediction (ECGP) is proposed in this article. To be specific, a novel dual-end data prediction mechanism (DDPM) is presented based on the gray prediction model to cut down data redundancy. Furthermore, the prediction process of the gray model, namely, a dynamic and fixed size prediction queue scheme, is optimized to enhance the prediction accuracy. A novel energy-distance factor (EDF) and a novel dual-threshold-based critical condition (DTCC) are proposed with the aim of realizing load balance and alleviating the challenge resulted from random events occurrence. Finally, extensive experimental simulations have been carried out to demonstrate the energy efficiency of ECGP. It is compared with the classic and several latest clustering algorithms, namely, low-energy adaptive clustering hierarchy (LEACH), R-LEACH, energy-aware hybrid approach, and energy efficient clustering algorithm based on particle swarm optimization technique. The experimental results indicate that ECGP outperforms the others in terms of the network lifetime, the throughput, and the energy efficiency.