The truth is somewhere between these two extremes. If you're looking to match to an unbelievably competitive residency (derm, neurosurgery, etc.), the connections your school has is going to matter. That's where the prestige comes in. Furthermore, highly competitive people are more likely to seek out the milieu you find at top-ranked schools.
If you're looking to do what you love, and what you love is not uber-competitive (family practice, OB, etc.), you're fine in a place that you like, that you feel is supportive, and that gives you the opportunity to get involved early-on. If you're not into research, rank matters a whole lot less, since many ranking systems are based on the amount of research dollars schools pull down each year.
Bottom line: seek out the school that meets your needs. You should know what those needs are. If you don't get into the school that meets your needs, make the best of it. Rock the boards. You'll do fine.