Against
The concentration gradient is the probability of where ions will go freely to try and make the concentration the same in each part of the cell. When ions want to cross into the membrane, most of them will have to go against the concentration gradient and will use energy to do so!
Hope that helps :)