We derive a gradient estimate for positive functions, in particular for positive solutions to the heat equation, on finite or locally finite graphs. Unlike the well known Li-Yau estimate, which is based on the maximum principle, our estimate follows from the graph structure of the gradient form and the Laplacian operator. Though our assumption on graphs is slightly stronger than that of Bauer et al. (J Differ Geom 99:359–405, 2015), our estimate can be easily applied to nonlinear differential equations, as well as differential inequalities. As applications, we estimate the greatest lower bound of Cheng’s eigenvalue and an upper bound of the minimal heat kernel, which is recently studied by Bauer et al. (Preprint, 2015) by the Li-Yau estimate. Moreover, generalizing an earlier result of Lin and Yau (Math Res Lett 17:343–356, 2010), we derive a lower bound of nonzero eigenvalues by our gradient estimate.