I guess you are referring to the case of quotient manifolds. In this case, f_bar and f have different domains. f_bar is from the total space (which could be R^n or any of its submanifold) to the real line and f is from the quotient space to the real line. Our interest is to optimize f.
It should be noted that the gradient of f is an abstract object, but its horizontal lift has a unique representation, and hence, the interest in computing the horizontal life of gradient of f.
An important observation is that the "horizontal lift of the gradient of f" is equal to the "gradient of f_bar," provided we endow the space with a Riemannian metric. If we have a different metric, this equality no longer holds. The Riemannian metric, for quotient manifolds, needs to satisfy some particular constraints.
Finally, as you have pointed out correctly, we do use "grad(f_bar(X))". But, this choice is with respect to a Riemannian metric in the space of f_bar.
Regards,
BM