It is my belief that some people are born with "good ears" (the ability to pick notes and intervals out in a song), some people need to work a lot at it for a long time to get really good, and some people will have minimal skills - even with a lot of work. I reserve the right to be wrong on that last part though, because I don't really know the amount of time people put into it who just weren't getting it.
I fall into the 2nd category. I always had an "OK ear", but in the past 3 years I've gotten to a place I never thought I could/would. I can pretty much figure out new songs in real time these days, sometimes learning complete tunes in less time than the actual song (by jumping ahead and figuring out the arrangements later). Here are some of the things that were really helpful along the way.
First... playing as many tuneful melodies as I possibly could on the bass. Christmas carols, nursery rhyme like tunes, traditional songs work best. I'd pick any note on the bass and play Pop Goes The Weasel, Rudolf The Red Nose Reindeer, Mary Had a Little Lamb, Home on the Range... whatever. TV show themes worked well too. Anything I knew the melody of, I'd just feel out on the bass. That gave me a good idea of where things were in relation to each other on the neck.
I also spent a lot of time learning to hear the bass lines in songs. I used to use Windows Media player, now I use Transcribe. Learning to EQ songs to bring out the bass helps lots (and that doesn't mean cranking the low end. The bass is usually most discernible for me in the lower mids, with the upper frequencies tweaked just right) . Decent speakers that bring out the bass notes helps tons too. I don't know why, but bass lines are crystal clear in my car. In the house they're still muddied up a bit, despite my going through many different speaker configurations. I have no suggestion for finding what's best, but I know some systems make it next to impossible to hear the individual bass notes. That can make learning really frustrating. Experimentation is the only suggestion I have for that.
And finally, what pushed me over the top in the past few years... I learn songs while driving (or at other times when there's no bass around). I've been forced to do that because of my current band situation. We learn anywhere from 1 to 6 new songs a week and I'm forced to learn them away from my instrument. What I do is listen in the car and visualize where I think the notes are on the bass neck. I play the songs over and over and do the best I can, and then when I get home I put it to the test to see how on or off I was. In the beginning I was waaaaaaaay off, often. But after doing this for years now, that skill (like any other) has gotten tons better. Without consciously trying to, I got much better at hearing intervals and can now learn some songs just by listening. I know what it sounds like when going from a C to a G as opposed to a C to an F or D to G (G# or whatever) - that kind of thing. Repetition with practicing that while listening only, well... makes you better at it

.
And an afterthought - 2 other things I've done lots of that definitely helped. Jamming with as many people as I possible could. Friendly people who allowed me to learn without judging, and jamming along to songs. I used to do that with LPs (cuz I'm old like that), but nowadays we're blessed with stuff like this.
Put a 1/2 an hour a day in jamming along to different tracks like that (even 15 minutes) and things will start happening.
Hope that helps at least one person, cuz it took me a long time to write

.