In accelerated fluids, fluid in a container can orient itself in a direction due to acceleration. In that case, pressure at different heights (at the surface) is same (atm). Then at the same height, pressure is different. How does this pressure increase along the horizontal?
[Physics] Pressure difference along horizontal in accelerated fluids
fluid dynamics
Related Solutions
Look on the water from the point of view of the accelerated reference frame oriented in such way that the surface of the water is parallel to plane $x'y'$ and depth below the water surface is measured by $z'$. In this frame, the total gravity (due to Earth's gravity and due to inertial force of acceleration) is directed perpendicular to the water surface and has intensity $\sqrt{g^2+a^2}$ (hypotenuse from the Pythagorean theorem). By the same argument as in usual circumstances, the pressure is function of depth $z'$: $$ p = z' \rho \sqrt{g^2+a^2}. $$
So to find out pressure at any point, find out its coordinate $z'$ and use the above formula.
The up-down pressure from gravity/air meets the down-up resistance of container's bottom (and fluids are hardly compressible). This makes particles "look for their way out of the trap". The only option (if possible) is go sideways.
(If you exert additional pressure on the block of butter with the palm of you hand, it will get squeezed out sideways.)
Without gravity there is obviously no atmospheric pressure as well. It is gravity that retains air at the Earth's surface, so atmospheric pressure is the result of air's weight. Without gravity the atmosphere would have escaped into space.
Simple velocity (without acceleration) of a box in space changes nothing. Constant velocity means no force acting on the fluid inside the box (Newton's first law), so the fluid will exert equal pressure on all the walls of the box. (Gravity-generated pressure results from acceleration and not from gravity.)
EDIT: Gas or liquid is not held together like a solid body is. Their intermolecular attractions are weak compared to the kinetic energy of their molecules. These molecules propelled by their kinetic energy exert uniform pressure on all of the walls of the container it is held in (fluid would not normally exert pressure on the top wall of the container) as its molecules move around chaotically. If there is no gravity present, the value of this pressure depends on its kinetic energy, which varies with the temperature (compression is also a factor here).
Now, gravity is acceleration ($g=9,81 m/s^2$) and that's why it pulls air in the direction of the gravity source. If a gas would be held in a container placed in space without gravity, the pressure of the molecules would exert equal pressure on all the walls (that's the case I described in the paragraph above). Adding simple constant velocity would not change that (Newton: "When viewed in an inertial reference frame [i.e. at rest or with constant velocity], an object either remains at rest or continues to move at a constant velocity, unless acted upon by an external force [which is the source of acceleration].")
Going back to your first question to sum up. Horizontal pressure in liquid results from two factors - the kinetic energy of molecules (which makes them move chaotically in all directions) and the Earth's gravity (as molecules are pulled down by gravity and look for escape sideways).
Best Answer
Pseudo-forces and/or accelerated frames simplify this mathematically, but here’s a way to understand it conceptually:
Consider a little bit of fluid in the middle. The pressure it exerts to the right has to be enough to accelerate all the fluid to the right. (“Has to” in the sense that fluid will flow around & seek levels so that this is true)
Now consider the bit of fluid just to the left of that. It must be exerting more pressure: it has to accelerate the bit to its right (the bit in the middle) plus all the stuff to the right of that.
So as you go from right to left across the middle, the pressure goes up.
From here you can create an exact model with $\Delta x$ etc, but this is the basic idea.