Catalysis of the transfer of a solute from one side of a membrane to the other, up its concentration gradient.