It is not that hard. There are already a few good advice on feeling the gravitational pull and skirt the perimeters first. My version if not addition is: play it slowly, I have no problem running away from bigger planets provided that I don't have much velocity myself. If you are moving towards the bigger planets at speed and then its pull accelerate you towards it, you need to decelerate against your own velocity plus the pull, which is why you cannot escape before you are too close.