Here's the best explanation I can give:
Assuming you're landing in you're dominant stance you should first be super comfy with sliding whatever rail you're hitting unnatural so if you can't get the spin around you can still recover and try to slide it out. And if you're landing unnatty, well be good at unnat is what I'm trying to say.
You should also be good at doing a 3 on some small stuff in whatever direction you spin for a 270.
For example I slide rails left foot forward but like to spin right side, so to 270 on, and land natty I have to spin unnatural. Before learning 270's I really dialled my unnat 3's
So when approaching the rail, I never come straight at it. I almost carve into it like I would a jump, but not as intense since it's just a rail.
Here's a shitty sketch of the direction I would approach:
Coming from an angle reduces the actual amount you have to spin and just makes things easier.
Make sure when you land you kinda lean forward to balance out and prevent yourself slipping off like so:
Now there seem to be 2 popular ways to do a 270 on, you either do a 180, spot the rail then sorta shifty the last 90 degree's so you don't over rotate.
The other way you 270 on is by coming on like you would unnat, but popping higher and throwing harder, then once you've covered the first 90 degrees and are currently in an unnatural stance ABOVE the rail, spotting said rail you shifty the last 180, spot and land. If you watch pro's 270 onto higher rails you'll notice they tend to do something like this, spinning the last 180 of the 270 rotation once they are totally over the rail unnat.
When I was learning I tried the first way (180 then 90) and had the exact problem you had. I didn't want to try the second way because shiftying 180 sounded harder. Eventually I decided fuck it and tried and it came around perfect.
So in a nutshell come at an angle, get over the rail unnat, then spin that last 180.