A very common situation is the internally or externally fixed due date. For example, a new system is needed to support peak season for a company, like Christmas for most retailers. Miss the date, no point in having done the project. Meeting a government legislated deadline is another case.
The key is not to freak out, but to essentially define what can reasonably delivered in the set timeframe, starting with a given set of resources. Use a rule-of-thumb like 25% analysis, 50% development, and 25% testing to divide up the timeframe. Work with the experts to estimate what can be created in such a timeframe. review that with the sponsor; if its not enough, try adding more resources but knowing that there is an upper limit on resources before adding more actually slows things down. Get creative, figure out what can be done in parallel, and have parallel teams/projects.........
Again, the key is not to say that fixed dates are not reasonable, but to work with the business to agree on what can be delivered by a fixed date. I have found that it is almost never completely what is wantedd, but it is enough to meet immediate needs, then add to it in another go-round.