Was a long road, and would have been a lot less torturous if I had been better in math. Not because I've needed math much in my programming career, but because my bad math became a reason that gatekeepers closed doors on me over and over again. Perhaps the strongest cause of imposter syndrome I have at work is less related to not having a CS degree -- because I feel like I know about 99% of the content of any CS program -- but more to do with the fact that I work around a lot of maths geniuses.
In reality the "math" I failed in high school was more arithmetic than mathematics per se. I feel like I might have a disability around numbers but I've rarely had problems with the higher level symbolic manipulation involved in algebra or programming or symbolic logic, etc. though my probably-ADHD means I have to really step back and work through things at my own pace in my own environment, and so whiteboard coding type interviews really piss me off.