I approach difficult sections of songs by trying alternate positions on the fretboard until I find the most comfortable way to play it Then, and this is the most important part, always working to a metronome, play that section dead slowly, over and over.
Record yourself - even better video yourself so you can really see what you are doing.
I play a little game with myself where I have to play the section flawlessly three times in a row before I'm 'allowed' to increase the tempo.
Oh and only 20 - 25 minutes at a time then stop for at least 5 minutes, do something totally un bass related before returning. This allows your brain to properly absorb the practice.
If you're starting to get worse after a period of time on the same part - stop! Go have a cuppa, look out of the window, meditate, chill. Come back to it refreshed.