  We study theoretically the erosion threshold of a granular bed forced by a
viscous fluid. We first introduce a novel model of interacting particles driven
on a rough substrate. It predicts a continuous transition at some threshold
forcing $\theta_c$, beyond which the particle current grows linearly $J\sim
\theta-\theta_c$, in agreement with experiments. The stationary state is
reached after a transient time $t_{\rm conv}$ which diverges near the
transition as $t_{\rm conv}\sim |\theta-\theta_c|^{-z}$ with $z\approx 2.5$.
The model also makes quantitative testable predictions for the drainage
pattern: the distribution $P(\sigma)$ of local current is found to be extremely
broad with $P(\sigma)\sim J/\sigma$, spatial correlations for the current are
negligible in the direction transverse to forcing, but long-range parallel to
it. We explain some of these features using a scaling argument and a mean-field
approximation that builds an analogy with $q$-models. We discuss the
relationship between our erosion model and models for the depinning transition
of vortex lattices in dirty superconductors, where our results may also apply.
