This is true, but IME only partly. I don't think it's a special gift that some have and others don't. I think all that's necessary is a half decent ear, and lots and lots and lots of practice.
My ear was always "OK," but I was never one of the guys who could do the above. Until the pressure started getting put on my bigtime, about a year and a half ago. I've been playing in a band now where I have to learn anywhere from 2 to 8 songs a week, and play them flawlessly by the weekend (with no rehearsals). I was forced to find new ways. I started listening to whatever songs I had/have to learn, relentlessly - and doing the best I can to figure them out WITHOUT a bass in my hands. For me that means while driving.
When I first started doing that, I was way off. After doing it hundreds of times, and checking the fingering/fretboard I was imagining in my head when listening - intervals started to be a lot easier to recognize. It took a while, but I started to be able to listen to songs in my car, and then come home and be able to just play right along. I couldn't do that 2 years ago - point being, it's a skill that CAN be learned.
As far as memorization goes - I don't read, and for some reason charts make it impossible for me to ever remember. If I chart a song out, I'll have to always use the chart, and I don't like doing that. Doing the above, and developing my ear - I now only have to get the song embedded in my head. That's easy. I just listen to it 100X

. Then the rest happens as Stumbo said - the fingers just go where they're supposed to, cuz they're trained to.
That's what works for me.
I think the key is in trying everything, remaining open minded, and committing to success. Patience helps a lot too.