A5 does not treat levels as flat, gravity is merely part of the template scripts.

You will have to program all the gravity and space physics yourself, it will be complex but its possible.

if you try using trace, and trace from the spaceship to the planets center, you will have the distance to the planet which you can use to determine pull strength, and use vec_to_angle to find the direction to the planet. You would need forces for the ships thrust etc, and separate forces for gravity ie
ent_move(thrust.x,gravitypull.x);
I'm afraid I cant work out how to move it in the direction of the planet, but it is possible.