1. You could have the gravity produced by a big wad of dark matter
Dark matter is a hypothetical type of matter distinct from ordinary
matter such as protons, neutrons, electrons, and neutrinos.
Dark matter has never been directly observed; however its existence
would explain a number of otherwise puzzling astronomical
observations. The name refers to the fact that it does not emit
or interact with observable electromagnetic radiation, such as light,
and is thus invisible to the entire electromagnetic spectrum.
Although dark matter has not been directly observed, its existence and
properties are inferred from unexplained mass in gravitational lensing
calculations, which affects the motions of baryonic matter and
Given that light and radiation pass through dark matter (but the path of radiation can be bent by the gravity of dark matter) it may be that other things pass right through also - like people. Dark matter might only have gravity.
2. Gravitational mass not in 3D plane.
Consider a 2D world. I am a flatlander and there is a large 2D mass as well - perhaps a big circle. The gravitational forces between us can be expressed as a vector. The vector can be considered a sum of X and Y vectors.
Now a 3D world. I am here, and so is Earth. The gravity between me and Earth can be expressed as the sum of X, Y and Z vectors.
Depending on how you want to make gravity work, you could have extraplanar objects exert gravity. In the 2D world, if a 3D sphere intersected it the flatlander would perceive it as a circle. You could have gravity exerted along X and Y vectors by only the mass of the sphere that was within that 2D plane. In this case it would not be possible for me to experience gravity from something which was not in the same plane as me.
Or - you could have extraplanar objects exert gravity on things not in their plane. The entirety of the mass exerts gravity as is the case between me and Earth. For the Flatlander the entire 3D mass could pull, but only the X and Y vectors would be relevant. A Flatlander cannot be pulled out of its 2D plane and so the Z vector is irrelevant. To calculate the pull of a 3D object out of plane of the 2D object one would calculate X Y and Z vectors then drop Z.
So too your 4D object. If you have gravity work this way an extraplanar 4D center of mass can exert gravity on a 3d object via X,Y and Z vectors but not "A", which would pull me out of my 3D plane.
It does not have to be a 4D object exerting gravity on me. It could be an ordinary 3D object but not in my 3d plane. An interesting speculation: perhaps dark matter (that has only gravity) is actually normal matter which is not in the same 3D plane as us, but can exert gravitation influence on objects in our plane. A 3d star in a 3d plane "adjacent" to mine via the 4th dimension could exert gravity on me but I would not see its light or feel its heat.
3. Bent space.
There are actually two different parts of general relativity. They're
often stated as
- Spacetime tells matter how to move
- Matter tells spacetime how to curve
Gravity is actually a product of locally warped spacetime. Spacetime warps because of matter in it. I recommend the linked article on the physics stack for those interested. Could spacetime get warped absent any matter? I am thinking of the dent a cat leaves on a pillow. When the cat leaves the dent stays. Of course curved spacetime is kept curved by the presence of matter and uncurves as the matter moves on. But what if there were a piece of spacetime that like the pillow stayed curved even though the cat has left? This "bent" would produce gravitational effects despite there being no mass - it would only be spacetime telling matter how to move.
Sort of spooky but maybe appropriate for concept-driven high SF.