In this paper, we study the problem of data gathering in multi-hop wireless sensor networks. To tackle the high degree of channel contention and high probability of packet collision induced by bursty traffic, we introduce a novel model based on random channel access scheme for data gathering. In our model, both data delivery reliability and latency are considered, and our goal is to tune the attempt probability for each sensor node so that the data gathering duration can be minimized on condition that each link in the data gathering tree can provide guaranteed per-hop packet delivery reliability. We formulate this problem as an optimization problem and propose a distributed heuristic algorithm which exploits only two hop neighbors information to solve it for tree networks. We evaluate the algorithm and the model by simulations, and results show that our algorithm has low computational complexity and our model can provide a good trade-off between reliability and latency for data gather...