If I take a PhD from a not so well standing university, will I be less respected in science? Let me give you additional context on the question.

I am a master student in Computer Science (hopefully graduating this year). I want to do a PhD later on (after working in the industry for a bit). I am currently writing a paper with an aspiring associate professor. He doesn't have a lot of heavily cited publications yet, but he is aspiring to go to more prestigious conferences and pushing himself. The university I go to doesn't rank high in the world ranking of the universities, but in my country it is one of the top universities.

My question is, then: If my advisor isn't a star scientist (yet) and if my university isn't some worldly famous one, can I still be a well-respected scientist, provided that my work is actually good? I guess that the broader question I am referring to is: Is there elitism in academia, or is it merit based?

Thank you in advance!
Your career depends much more on what you do than on the university you attend. Even for doctoral study. It is true that getting the first job may be easier for those from internationally known research universities, but once you have a position, you also have opportunities, just as does your current advisor. 

Also, consider that some students at those top 50 universities won't finish, and some of those who do will face burn-out. Others will just not live up to their "early potential" and not advance very far or fast. 

But there is some elitism, of course. Oxbridge is world respected and much is expected of their graduates. On the other hand, Harvard University has an excellent reputation, but it graduates some awfully stupid (and dangerous) people. In the long run it is "merit" that rules the day. It is often written that there is "nothing more dangerous than a C student from Yale". Don't be that student.  

I encourage you to stretch yourself toward the "best" university within your reach, though "best" can mean a lot of things beyond world ranking. But then, do your best and work collaboratively with others to advance your field.