First, there are two key statements that are important to keep separate.
The work-energy theorem says that the net work is equal to the change in kinetic energy.
The work done by a gravitational field, is equal to the minus the change in the gravitational-potential energy.
The way I interpret your question, is that you move a block on a horizontal table from point $A$ to point $B$, in such a way that its initial and final velocity are $0$, and that its height doesn't change.
Then the gravitational field does no work, $W_{g}=0$ (since the height of the block never changes). Furthermore the difference in gravitational potential energy between points $A$ and $B$ is zero, $U_g(B)-U_g(A)=0$. Statement 2 reads $W_g=-(U_g(B)-U_g(A))$. Since $0=0$, there is no contradiction.
I think you may also be confused because there is non-zero work done by whatever is pushing the block as it moves from $A$ to $B$. This is true, but there is a zero net work. In other words: while moving from $A$ to $B$, obviously the block has some non-zero velocity and so it has some kinetic energy. Some work is needed to speed up the block from $0$ velocity at point $A$, to a non-zero velocity. But then some other work is needed to stop the block as it approaches point $B$. Since the change in kinetic energy is $0$ (the block started and stopped at rest), the net work must be zero. In other words, the sum of the work done by the force that speed the object up, and the work done by the force that stopped the object, must exactly cancel. This is not an obvious statement, given that completely different forces could be responsible for speeding up the block and slowing it down (maybe a rocket gave the block and initial boost and friction ground it to a halt). But this is the power of the theorem. You can check in special cases that the work energy theorem does in fact work -- for example, if you attach a block to a spring, pull on the block, and release it from rest, you can check explicitly that the work the spring does speeding up the block exactly cancels with the work the spring does in slowing it down as it approaches its resting position.