If someone doesn't have stellar grades in high-school, and in the bachelor's, does earning a PhD help much? If someone doesn't have stellar grades in high-school, and in the bachelors: 


Is there really any possibility for him to work in the field of academia?
Does earning a Ph.D. help much, or is it just a waste of time in this case?
Check this out:


  Nobody in theoretical computer science cares where you got your degree. Really. We. Do. Not. Care. We only care about the quality and visibility of your results. Publish strong papers and give brilliant talks at top conferences. Convince well-known active researchers to write letters raving about your work. Make a good product and get superstars to sell it for you. Do all that, and we'll definitely want to hire you, no matter where you got your degree. On the other hand, without a strong and visible research record, independent from your advisor, you are much less likely to get a good academic job, no matter where you got your degree.


If people don't care where the applicant got his/her PhD, they are not going to care about high school or Bachelor's grades. Even outside of academia, it's a general rule that one's latest degree supersedes all the previous ones. Once a person earns a PhD, nobody cares about his or her Masters, Bachelor's, or high school results.

The real concern here is whether the person who didn't do well in high school and in the Bachelor's can still earn a PhD, but that is for a separate question.