Gradient estimates for a nonlinear elliptic equation on smooth metric measure spaces and applications