Well the worst possible thing you can do is wait until the just before the deadline and quit with no notice. We had someone do that to us and it blackened his name not only with us but to every other employer who later hired one of our employees who worked with him.
Quitting every time you get in over your head is a losing proposition. It is better to stick it out and learn to work through problems rather than give up.
So first steps, you need to triage what the problem is. Is it lack of the technical skill you need, lack of the time you need or both? Or is it something else?
If you feel that you are in over your head technically, then you need to own up to it and ask for help. Tell them what you are stuck on and go in with a plan to get the skills you need. Tell them how this might affect the deadline.
If you feel the project as given to you cannot be completed due to time constraints, then spend a couple of hours and lay out all the tasks in detail that need to be done to meet the requirements and how long you estimate each will take and show them the problem. Ask them to either remove some requirements from the initial project and push to later versions or to move the deadline out to something that is reasonable. But don't do this until you have the details to show them why it is necessary.
If the problem is that you can't get a handle on the requirements because they are ever changing or not well defined, then you need to sit down with the stakeholders and get a solid requirement that you understand and then you need to make sure that any change to it adds hours to the project plan. Use the house building analogy if you need to in order to get the the stakeholders to understand what they are doing to you. A builder wouldn't accept changing the floor plan in mid-construction without additional time and money and neither should you.
It is possible you could also just be in that stage of a large project when you feel you have made no progress but just before everything starts to come together. It is my experience that there is a stage in most large projects (and not just software projects) when things look hopeless. Usually this is just before you make some major breakthrough. If you think you have the skills and you understand the requirements, often this is what you are experiencing. Sometimes it helps to look back and see how much you have actually accomplished. Sure nothing works yet, but how close are you really to making things work. There can be a lot of up front prep time and setup stuff in some projects that doesn't feel like progress but is. If you have a project plan, you can see what tasks remain to be done and how long they will take. This should give you confidence that you can get them done.