Not entirely sure of the answer you are looking for, but when a molecule is moved against a concentration gradient, there is energy involved.
For example, the proton pump in the body (H+ ATPase) requires an input of energy in the form of ATP in order to provide the H+ concentration gradient that is needed.