Can a successful, prestigious post-doc make up for a PhD from a mid-ranked university and make you competitive for a tenure-track position? EDIT: Apparently, the longer version below is somewhat off-topic due to the number of personal, non-generalisable factors involved in the decision it describes. I do however believe that the main question of whether a good post-doc can outweigh a "bad" or "modest" PhD is highly general both in its nature (trends in hiring and successful curricula do exist in academia) and interest for current, past and prospective grad students. For this reason, I would sincerely appreciate if fellow users could discriminate between the main question in itself and the additional, somewhat optional description of my personal situation given hereafter before flagging the message as off-topic.

Detailed, horrendously long version below for those brave enough to face a wall of text:

I recently graduated with highest honours from a good, albeit not tier 1 UK university. Like many science students, my dearest (and pretty much only) wish is to become an independent researcher in a good university, preferably in the US. Unfortunately, today's academic market being in the atrocious state we know, entertaining the hope of becoming a PI without a stellar curriculum appears suicidal. And judging from the CV of most of the tenure or tenure-track academics in the top 30 universities, the crucial point in an academic's career appears to be grad school, as over 95% of those I checked hold PhDs from a top-ranked institution in their field. This trend seems even stronger among the younger generation, as pretty much every cases of faculty coming from "lesser" institutions (e.g. U. Delaware or Ann Harbor) have been appointed in the late 80s or earlier, while most recently-filled positions went to CHYMPS alumni. The most terrifying point being that even in mid- or lower-ranked universities, the vast majority of professors also comes from top grad schools.

I have been offered a fully-funded PhD scholarship at a Russel Group University. The subject is exciting, and I was first very happy with this offer. Unfortunately, although the uni ranks 3rd or 4th nationwide as a whole, the department in which I would enroll in very poorly ranked (in the 50 - 75 worldwide bracket at best) and has an abysmal placement record for PhD students. Worst: the project is a coin toss, and has about the same probability of yielding very high-impact results as of yielding nothing at all. However, due to a number of factors (source of the funding, network the research group is a part of, subject of the PhD project), even a moderately successful outcome could position me for a series of very prestigious post-doctoral fellowships, that would take me to leading US universities.

Which leads - finally - to my question: Is it completely insane to contemplate declining this scholarship in order to apply to higher ranked departments? This option would obviously force me to take a gap year (which I could use, to be honest) to get back in synch with the applications calendar. Considering my academic record (3 degrees all obtained with high honours, 4.0 GPA, 2.5 years of research experience, 2 published papers in 5+ impact factor journals, and industrial experience through the potential gap year), I believe I have a decent shot at high ranking programmes both in the US and the UK. This is, however, a big gamble, as I would have absolutely no assurance of finding another PhD of equal or higher quality when taking my decision.

Currently, my decision hangs from the title-question: let's say I take the studentship and (big if here, I know) manage to secure a high-end postdoc position; would that postdoc offset the modest ranking of my grad school and give me a decent shot a tenure-track positions in the US?
To my perception, the later you manage to "hit" a high-status place, the better, actually, because the standard pattern is a slight-but-steady ever-lesser-status trend. That is, typically, and statistically so if only for reasons of the available positions of various sorts, one's PhD institution is probably (and on the average, certainly) the highest-status place one will ever be. In particular, one corollary is that high-status post-docs are not typical sequels to high-status PhDs (even though a reason, if no other, is that there aren't as many such positions!)

On the other hand, a higher-status post-doc than PhD assures nothing. A momentary "surprise improvement", with no permanent "advantage".

The more genuine advantage is that, in the best-case scenarios, the high status is due to good, energetic, communicative, stimulating people who will help you do better for the rest of your life than if you'd been in the company of lethargic, disinterested people... though "status" is imperfectly correlated...

And, further, it does require considerable effort on your part to benefit from the potential of the environment... so it is just as easy to fail/languish in a high-status environment as in a low-status one... Perhaps easier, since things are more intimidating, no easy triumphs, etc. Almost to the point of being misleading. (Hence, the desire of some to be big fish in small ponds, etc.)

So, actually, I'd recommend accepting some risks to be in a more intense environment. If that intensity is attached to status, ok, good, that's a cosmetic virtue that will help you get peoples' attention (on hiring committees) subsequently.