What I meant was:
Consider a particle on the ground. This particle is raised by a force of magnitude mg to a height h above the ground. At this point, the work done on the particle by the force is mgh, which is equal to the potential energy of the particle. But, during this period, the force of gravity also acts on the particle and is displaced by h, and so does a work of −mgh on the particle. Shouldn't the two cancel and no net work should be done on the particle?
If they don't cancel, then where did the energy that came from the work done by the force of gravity go?