In UK English it’s an older expression you don’t hear much that means ‘very drunk’. It might have other meanings but that’s the one I’m aware of.
It relates to another expression, ‘drunk as a newt’. A newt is an amphibious animal, the idea of the expression being that like the newt is often in water, as if drinking lots of water, the drunk person has also taken on way too much liquid (alcohol). Fish have gills (for breathing), so the image in ‘over the gills’ is of someone being up to the gills in alcohol like a fish is up to the gills in water.
Over essentially means being or moving above something, as in ‘over the top’, ‘over the rainbow’ etc. Used figuratively it can imply forward motion and a sense of rising above something, as in ‘I am over that relationship’.