Data gathering in a wireless sensor network works in a way that a sink collects data from a large number of sensor nodes. Traditionally, the hop-by-hop transmission is used in this many-to-one communication. In this communication pattern, the closer a sensor node is to the sink, the sooner its energy is exhausted. The nodes close to the sink need to route data packets for farther nodes and thus the unbalanced energy consumption results in a short network lifetime. In this paper we discuss the problem of balancing energy consumption of the WSN with grid topology and propose a randomized data gathering scheme. In our scheme, direct transmission is tradeoff by hop-by-hop transmission so as to protect the sensor nodes with higher load burden from early exhaustion. The network lifetime is thus prolonged.