Adam Roberts, "On"
The story follows the life of an adolescent named Tighe (pronounced, roughly, Tig-Hee). Tighe's village is built on the ledges and crags of an enormous cliff-face, called the Wall or the World-wall. Every morning, the sun rises from the bottom of the wall, and every evening it sets at the top.
...gravity once pointed towards the centre of the earth, but catastrophically changed due to mankind's over-dependence on Zero Point Energy as an energy source.