Actually you are asking about two different situations.
In the case of a mercury barometer, if it is constructed correctly, the only gas above the mercury liquid will be mercury vapor. In such case, the pressure at the gas-liquid interface will be the vapor pressure of mercury. That pressure will be independent of the height of gas above the liquid. Mercury will condense or evaporate as necessary to maintain that pressure as the liquid rises or falls in the cylinder. The interface pressure can rise or fall with changes in temperature since the vapor pressure is a function of temperature. At 21 degrees C the vapor pressure is .002 mm HG, so it is pretty small.
As stated in the comments, height differences in the laboratory is generally too small to cause a significant difference in gas pressure.
One example of a situation where its necessary to calculate gas pressure changing with height is in a gas well. To calculate pressure at the bottom of a well given the surface pressure for a well hundreds or thousand of meters deep, the change in pressure with depth must be taken into account. This necessarily involves numerical methods, because the temperature varies with depth and the density of the gas varies with pressure and temperature and the ideal gas law is not accurate enough to use with the pressures and temperatures involved.