Your question has many different answers depending on the specialty and your long term goals within that specialty. There are many other threads addressing this question, and I would suggest that you look at those. The simplest answer is that you can do anything from any medical school as long as you work hard. I have seen this in practice several times. However, you are not going to match derm at MGH if you go to a small state school. Personally, that wouldn't bother me. If, however, you feel that you need to match the most competitive specialty at Harvard then, yes, reputation and rank of your medical school matter.