Begin by going back to the defining documents including your Charter, Statement of Work and approved Change Requests. Figure out what you have committed to accomplish. Conversely, document all of the things that were unofficially added to the project. What you are trying to obtain is a clear understanding of the commitments and the expectations of others. With these lists in hand, meet with the project sponsor (or similar key stakeholders) and agree on what should be part of the current effort.
Based on the remaining effort and current resources, recalculate the schedule. Forget the deadlines placed on the project at this point. Given the amount of work and people available, determine a realistic timeframe to complete the revised scope.
Find out what the budget is and how much has already been spent. After calculating the difference between the two amounts (hopefully it isn't negative) compare it to what remains to be done. Based on your revised schedule run the numbers to determine a reasonable estimate to complete.
Meet with the team and other stakeholders to determine where the project went wrong. Develop a list of steps to take in order to avoid the same thing happening next time.
Using the scope, schedule and cost information review the options available. Based on the Project Triangle[1] that pits scope, time and cost against each other, consider the impact of each of your options on those factors. Will your plan include adding more resources? Extending the date? Reducing the scope? Although "phase 2" is always the answer to most project jokes, it can be a solid alternative. In some extreme cases the right decision will be to cancel the project. Although an unpopular choice, some projects need to be dropped. Reduce the testing phase is usually the popular option, but I don't recommend it.
Once you have drawn up a couple of viable alternatives, present them to the management team. Begin with a healthy dose of reality. Management does not like going through the failed project dance. If they have to do it twice things get ugly. Lay out the situation, preferably without playing the blame game. Then present your plans for getting back on track. Let them help you talk through the options and make suggestions.