The performance of a robot controller depends on the choice of its parameters, which require careful tuning. In this paper, we present DiffTune, a novel, gradient-based automatic tuning framework. Our method unrolls the dynamical system and controller as a computational graph and updates the controller parameters through gradient-based optimization. Unlike the commonly used back-propagation scheme, the gradient in DiffTune is obtained through sensitivity propagation, a forward-mode auto differentiation technique that runs parallel to the system's evolution. We validate the proposed auto-tune approach on a Dubin's car and a quadrotor in challenging simulation environments. Simulation experiments show that the approach is robust to uncertainties in the system dynamics and environment and generalizes well to unseen trajectories in tuning.