You can use Areas for that. Both Area2D and Area3D have properties to alter the gravity of nodes inside them. See space_override and the various gravity_… properties they have.
Alternatively, you could manually detect when the player enters the Area using their body_entered signal, and implement a custom gravity that way.
Here’s an article from the official documentation on how to use an Area2D to modify gravity. The properties can also be applied to an Area node (with some modification, of course).