Yes. The variation of pressure in a fluid at different height is due to gravity and is called hydrostatic pressure. It is defined as:

p - p0 = rho * g * h

where

h = z - z0 is the height from the reference point 0 (arbitrary)

p0 is the pressure at reference point 0

rho is the fluid density

g is the gravity (assumed constant)

BTW if you are interested, check out this free course by Ansys, that talks about Fluid Statics in detail:

https://courses.ansys.com/index.php/courses/fluid-statics/