If we keep an hold a tube in air with the closed end up and open end downwards, containing mercury upto a length of 76 cm, why does the mercury not stay in place? Shouldn't atmospheric pressure exert a force equal and opposite to its weight and balance it?
You probably mean this:
Let we fill the tube with closed end at the bottom with 76 cm of mercury. Then we will turn the tube upside down. The mercury will flow out from it.
It happens because during the rotation of the tube some amount of mercury flowed off, and is instantly replaced with air, which moves up to the closed end of the tube.
So after the turn of the tube, there is an air pressure not only from the bottom, but from the top of the mercury column, too.
If the mercury would stay in an inverted tube depends on the surface tension which is a function of how well mercury wets the tube, the diameter of the tubs, the height of the mercury column, and the density of mercury.
Fill a glass coke bottle with water. Turn it upside down. The water doesn't pour out nicely but glugs out as globs of water break off and air bubbles travel up the bottle.
Now take a capillary tube. It will suck water up into the tube.
The difference in the behavior between the two containers is surface tension. The wetting is essentially the same since both the coke bottle and the capillary tube are made out of glass.
In an open tube, air will press down on the top of the column of mercury, as well as up from the bottom via fluid pressure. The net force will be the weight of the mercury in the column.
In a closed evacuated tube, ther is no air pressure pushing down from the top; only the pressure from the bottom and the weight of the mercury. The mercury column needs to be about 76 cm high for those two forces ato be in equilibrium (the pressure due to the weight of the mercury equals the air pressure transmitted via the liquid at the bottom).
I misread the OP's question; it was not directed at why the mercury stays in a closed tube in a barometer with the open bottom in a mercury reservoir; it was directed at why mercury will stay in a closed tube that is open to the air at the bottom. The answer and comment by @MaxW are correct.
I never experimented with mercury but I did with water. Here a summary of results.
Take a small bottle, fill it with water and invert it keeping mouth closed, e.g. with a cardboard piece. Now remove the cardboard sliding it horizontally: you'll see that water stays put if bottle's mouth diameter is under a certain threshold, about 1 cm (I don't remember the exact data - it's been years). Bottle size has a minor influence.
My interpretation involves surface tension but in a complex way. Assume the surface of separation between water and air is initially plane. The question is: will that surface be stable against unavoidable perturbations?
Any perturbation will deform that surface to a curved one, with two effects:
lowering water's centre of gravity, thus decreasing its potential energy
increasing surface's area, thus increasing surface tension energy.
Water's state will be a stable one if any perturbation increases energy - unstable otherwise.
Then some non trivial mathematics is required to show that the former effect prevails above a certain diameter, the latter below. My numerical calculations, using density and surface tension of water, exhibited satisfactory agreement with experiment.
In an open tube there is atmosphere pressure acting on mercury from top end of tube. In a closed tube,there is no air trapped above mercury. In fact there is vacuum. In the construction of mercury barometer, for instance, we take a tube filled with mercury and carefully invert it into a cup filled with mercury. The pressure on mercury surface inside the tube and outside at same height should balance. Outside there is atmospheric pressure. Inside the pressure is only due to length of mercury column. So if the initial height of mercury column is > 76cm, mercury level drops in the tube to adjust to 76cm such that pressure exerted is same as atmosphere(think what would happen if initial tube length is <76cm). In case of open tube, the atmospheric pressure acts on the surface of mercury outside the tube. But inside tube also the atmospheric pressure acts from above. The mercury column would cause to increase the pressure and cause imbalance. So there would be no rise in case of open tube