I just encountered this for the very first time, and died practically instantly. It felt like a very cheap death, given every other stellar object in the game can be safely traversed. Its especially bad if you are relying on autons or have wingmen, because it murders them as well... Really needs some kind of warning, maybe a beacon or even better, an indicator on the map. It would also be helpful if entering the gravity field broke autopilot.
...thinking about it also: we can put travel warnings on the entrances to systems with strong gravity wells.
Maybe a ring of nav beacons at the 'no-gravity' orbit?
Honestly, if it's so problematic and counter to the way the rest of the game works, it's just not a good mechanic to have in the game.
At minimum the game should exit autopilot when the warnings start. We might also want to tune the radius of the warnings to make sure there is enough time (particularly if the player is heading straight for the star).