The amount of potential energy at the height of h When we lift an object upwards with a constant velocity for a distance of $ h $ the work that we've done is $mgh$ and the work done by the force of gravity is $-mgh$. So the net work on the object is zero and it doesn't gain any energy. how its potential energy will be converted to kinetic energy when we drop that object while it hasn't gained any energy?
 A: The total work done on the object is the change in kinetic energy:
$W_{total} = \Delta E_K$*
While the gravitational potential energy of the object is:
$U_G = mgh$
So, although it costs energy to lift the object up, the total work done on it is $0$ because both at the beginning and at the end it has no kinetic energy ($v_{i,f}=0 \rightarrow E_{K_{i,f}}=0 $).
However, that doesn't mean that:

it doesn't gain any energy.

The work done on the object was converted to potential energy:  $\Delta E = \Delta mgh$, and when the object is dropped the potential energy is converted back to kinetic energy.
*That's not the definition of work, but the total work done on the object.
A: 
So the net work on the object is zero and it doesn't gain any energy.

The object obviously did gain energy. The object's potential energy increased by $mgh$, and its kinetic energy didn't change. So what's going on? Is the work-energy principle wrong?
The answer is no, the work-energy principle is not wrong. The work energy principle merely says that the net work on an object is equal to its change in kinetic energy. It says nothing (yet) about the relationship between net work and the change in mechanical energy. To get that, you need to invoke conservation of energy.
The object isn't an isolated system; you acted on it by lifting it from the floor to the table. Since the object isn't an isolated system, it is invalid to conclude that net work being zero means no change in energy. You transferred energy to the object. In other words,
$$\Delta E = \Delta KE + \Delta PE = W_\text{net} + \Delta PE = W_\text{ext}$$
where $W_\text{ext}$ is the work done by you on the object.
If you redraw the system boundary to include you, the object, the Earth, and the table, the act of lifting the object from the floor to the table becomes internal. This is an isolated system. Assuming for the moment that your body burns glycogen perfectly (i.e., ignoring thermodynamics), the work-energy principle combined with conservation of energy says that there is no change in mechanical energy with this enlarged system boundary. Now you can say that no net change in kinetic energy and no net change in total energy means no net change in potential energy. Potential energy is now gravitational potential energy of the object plus the chemical potential energy of those stored glycogens. You burnt some glycogens to lift the object. Taking thermodynamics into account means burning more glycogens to account for the energy transferred to the object and the inefficiency of your muscles. Energy always balances.
A: Gravitational weight is a conservative force so work done against it is entirely equal to the change in potential between the start and end points (in the absence of dissipative forces like friction). The internal energy of the mass does not change as it is moved upwards and your assessment of the energy considerations is correct.
Consider alternatively the forces before conversion to work:
The weight of the object is $F_g = mg$
Since you're raising the mass at a constant velocity, the force you apply to lift it is equal and opposite to the above, i.e. $F_l = -F_g = -mg$
This produces zero net force on the mass and so zero net work. It continues to move at constant velocity and its internal energy does not increase.
When you stop applying your lifting force $F_l$ the mass experiences only its weight $F_g$, producing a non-zero resultant force, which then performs work on the mass as it moves from the area of high potential to the area of low potential (i.e. falls downwards).
The work done by this force up to a given moment in its fall is $W_{fall} = F_g \Delta h$ (where $\Delta h$ is the distance the object as fallen since being released), and is equal to the kinetic energy of the object at that exact moment.
A: Gravity doesn't do -mgh work on the object while it is lifted, gravity converts the potential energy gained while lifting the object (mgh) into kinetic energy (1/2 mv^2) after it's dropped.
