There's two different facets to this:
1- The quality of the components and build quality.
2- How it feels and sounds when you play it.
We can sit here all day listing out all the things that go into the 1st category of what makes a "good bass." What really matters is the 2nd category.
There are plenty of "flaws" from the 1st category that can be in a bass, but when you play it, you just love how it feels and sounds. That's kinda-sorta all that matters. If the bass sounds and feels right, the blemishes on the finishes, or less-than-perfect joints, or the slightly less good pickup or wood grain, or whatever, doesn't really matter too much.
The flip side, a bass can be "perfectly well made" on paper, and just not speak to you. You don't love the sound. You don't love the feel. You don't even like the color. So what good is it, really, for you?
That said, it's still good to know what goes into a quality instrument, and wanting to learn what makes a quality instrument is worthwhile. I don't want to dissuade from learning and understanding, because while it doesn't really matter, it kinda actually matters.

(sorta... sometimes.)
First and foremost are the pickups. It's an electric bass. Something needs to convert the vibrations of the strings into electrical current so the amp/speaker can turn it into sound. Pickups are actually really old and simple technology, on a basic level. They're just a coil of wire around a magnet. Whether they're hand wound or machine produced (which are more similar than they sound), quality pickups use quality magnetic components and wire, and have tighter tolerances in wind-count accuracy and output etc. And still, you gotta like how they sound. If you're not into the sound of Hi-Fi Modern bass tone, doesn't matter how good the pickups are, if they're designed to sound like that, you won't like them.
Then there's the wood choices. Not just type of wood, but the characteristics of the wood used in making it. For example, maple makes a great neck wood. But not all pieces of maple are the same. A cheapo manufacturer might just get a huge stock of maple blocks and just crank out as many necks as possible, pay little regard to the density or direction of the grain. A quality bass maker will start by trying to only buy maple stock with better grain patterns, tighter grain, nice resonance, etc, and then will let that wood sit for some amount of time to ensure it ages/dries/cures/whatever you call it before making a neck from it.
There's the fit and finish. Did the manufacturer just crank out a bunch of bodies and necks and slap them together? Are there gaps where the neck seats into the body or are the body and neck perfectly fitted together? Does the neck need or have a shim from the factory? Or was the neck and body designed to sit together properly? Does the bridge allow for proper seating of strings and intonation, or is it a cheap flimsy piece of metal that won't maintain string height and intonation, and breaks strings because of attack angles over the saddles? Do the tuners turn freely and hold their tune, or do they stick or not hold tune? Did they take the time to make the fret edges really nice, or are you gonna walk away with slices on your fingers? Are the frets leveled or did they just slap in some fret wire and be done with it? Is the nut a quality material and cut properly? Are the pots quality components or did they find the absolute cheapest low-tolerance-spec pots? Do the solder joints look solid making good electrical connections, or are they horrendous blobs of solder made by someone or a machine whose only job it is to solder as many possible units per day regardless of how well its done? Is the bass properly shielded from the manufacturer?
A lot of it boils down to the maker choosing better components and materials, really precise design and wood cutting, and then taking the time afterwards to hone and refine them to create a more-playable bass straight out of the factory. And a lot of that, in turn, leads to longevity of an instrument. A great instrument with quality wood and quality components could last you forever and sound great the whole time. Cheaper components might give up on you at some point, corroding or rusting prematurely; connections might come loose more often and need to be re-soldered often; bad wood choices could be more prone to warping or break easier when knocked around too hard.