Gym leggings used to mean one thin black pair that went see through the moment you bent over to pick up a dumbbell, and you just lived with it. That has genuinely changed. The decent ones now hold their shape through a whole class, the waistbands sit where they're meant to instead of rolling down mid squat, and the choice at a reasonable price has got so much better that there's no excuse left for the bobbled, saggy pair at the bottom of the drawer. It's one of the few corners of fashion that's actually improved for ordinary money rather than just for people with more of it.
Where they fall apart is pairing them with the wrong top. A long, loose t-shirt over a decent pair of leggings is a waste, you've spent on fit and then hidden it, and a cropped top that's too short will ride up with the leggings and leave a gap of midriff you didn't plan for. They also don't sit well with clunky trainers that drag the whole look heavy at the ankle, or with a baggy sports bra strap poking out the back, which reads as careless rather than deliberate. The best version of this outfit is simple: a fitted or slightly longer top, trainers that feel light, and leggings that do the talking.
The difference between a good pair and a disappointing one is mostly in things you can't always tell from a photo. Squat test them if you can, in the shop or at home before the tags come off, because cheap fabric goes thin and pale at the seat under any stretch. A proper waistband doesn't dig a red line into your stomach after an hour, and it doesn't need constant hoiking up on a run. Flatlock seams lie flush against the skin rather than rubbing, and the fabric itself should have a bit of weight and a slight matte finish rather than a shiny, thin stretch that looks cheap under gym lighting.
Good ones age slowly if you treat them right, cold wash, no fabric softener because it clogs the fibres that give the stretch, and out of the tumble dryer, which is the quickest way to kill elastane. Even then, the good pair will start to go a bit grey and lose some recovery after a year of real wear, that's just the fabric, not a fault. Where they're the wrong choice is anywhere you need actual pockets with zips, anywhere smart, or any day you're mostly sitting still, since the tightest, most supportive ones get uncomfortable fast once you're off your feet and just want to be comfortable.