I've started with some very basic fluid dynamics, basically what's in Khan academy. The Bernoulli equation, from what I know, relates the pressure to velocity at two different cross-sectional areas of fluid in in the same pipe, with the assumptions of laminar flow, an incompressible fluid, and no viscosity. Considering two different cross sectional areas, does the height refer to the height of the fluid's centre of mass (or the centroid of the pipe's cross section since the centroid is the centre of mass for a uniform fluid)? It seems to me that it is, but some confirmation would be reassuring.
In short: yes. The Bernoulli equation is just a statement about the conservation of energy for a simple model fluid. Since the fluid is assumed to be homogeneous, its center of mass lies in the centroid of the pipe's cross section. The $h$ is just the difference in height between the two points where energy is being calculated.
The $\rho g h$ term comes directly from $mgh$ for solid objects since we are interested in per-volume values of energy.