I would guess that besides maintaining excellent research the most crucial element is that you and your advisor are excellent networkers. If you go to grad school at the top school for your field, and your advisor is a tenured professor, you essentially need no social/networking skills - you can just sit in your office and write papers with your advisor and you'll be famous because your advisor is famous. Since your advisor will be one of the foremost experts in your field, everyone will read your papers since his/her name will be on it.
At a lower ranked school it's not guaranteed that you'll "get known" in the field, but I'm sure there are professors at lower ranked schools who manage to get to know many of the top researchers in your field. You can go to conferences and otherwise contact the top people in your field (hopefully try to collaborate with them) so that the top 20 crowd is aware of your research.