  We present a method to control gonality of nonarchimedean curves based on
graph theory. Let k denote a complete nonarchimedean valued field. We first
prove a lower bound for the gonality of a curve over the algebraic closure of k
in terms of the minimal degree of a class of graph maps, namely: one should
minimize over all so-called finite harmonic graph morphisms to trees, that
originate from any refinement of the dual graph of the stable model of the
curve. Next comes our main result: we prove a lower bound for the degree of
such a graph morphism in terms of the first eigenvalue of the Laplacian and
some "volume" of the original graph; this can be seen as a substitute for
graphs of the Li-Yau inequality from differential geometry, although we also
prove that the strict analogue of the original inequality fails for general
graphs. Finally, we apply the results to give a lower bound for the gonality of
arbitrary Drinfeld modular curves over finite fields and for general congruence
subgroups Gamma of Gamma(1) that is linear in the index [Gamma(1):Gamma], with
a constant that only depends on the residue field degree and the degree of the
chosen "infinite" place. This is a function field analogue of a theorem of
Abramovich for classical modular curves. We present applications to uniform
boundedness of torsion of rank two Drinfeld modules that improve upon existing
results, and to lower bounds on the modular degree of certain elliptic curves
over function fields that solve a problem of Papikian.
