In the end, your goal is to provide a solution to a problem for a client. Your role as a project manager is to communicate with developers on the project, clients, managers, and other stakeholders.
There are times when something must give, and that is either quality, functionality, or delivery date. As soon as you suspect that the project will go over the estimated time, the first thing you should do is communicate this possibility to all of the stakeholders.
By informing the client of the problems early, this puts the ball in their court and avoids any nasty surprises. Based on discussions with the clients' stakeholders, the client may decide to drop some features, the client may decide that quality isn't as important, or the client may decide that pushing back the due date is acceptable. This largely depends on their business goals, such as how flexible their schedule is or how important it is that the product be reliable.
In my experience, most clients will respect you for watching their back. Like you, your client has people that he or she must answer to, and if you keep them from having to deliver awkward, last minute bad news to their stakeholders, they will not only feel more in control, but the project will also run much more smoothly.