Well, this isn't very imaginative, but my choice-like that of several other contributors-is the pill. Here's my reasoning. The greatest invention of the last 2000 years is the one that is most likely to help avert the collapse of civilization in the next 2000. Electricity as a means of information and energy transport is a candidate. Modern medicine is a candidate. But what drives or exacerbates every major global problem is, ultimately, population growth. So whatever most effectively limits population growth is the greatest invention-and that's the pill, or contraception more generally.
Director of Science Programs at the David and Lucile Packard Foundation