Sci-fi story ID help asked for

Please help me id a science fiction story - it may have been longer than a story. It was about being on a city. I say “on” rather than “in” because these cities moved. Constantly. They had to - this was the driving force of the story. The reason as far as I remember was that the planet they were on had a weird gravity that somehow drew everything in a particular direction and everybody had to work really hard to ensure the city didn’t get sucked in by maintaining its movement in the opposite direction.

The kicker at the end was that it was all some sort of (psychological(?)) experiment and all anyone ever had to do was to step off the city and there was no weird gravity or anything of the sort that everyone was sweating bullets about. Or something like that.
If anyone could help id this story I would appreciate it. I’d like to be able to use it as a metaphor in the odd place here or there where I think it might fit. Thanks in advance!

The Inverted World by Christopher Priest (1974), expanded from the short story of the same name that appeared a year earlier in New Writings in SF 22.

Thanks, Bo. I had tried working my way through some anthologies (and checking author’s bibliographies, where I could find them) but wasn’t having any success.

You’re welcome; happy to help!