It depends on what sort of failure you're looking at. At a simplistic level, failure during exercise can result from muscle failure, the muscle breaking down sufficiently that it can't exert sufficient effort anymore, the effect that generally leads to enlarged, hard muscles, and soreness either then or the next day. This is muscle tears, how your muscles get stronger, and generally requires a prolonged period of rest, 48 hours being the standard figure.
Failure can also be a matter of not having sufficient energy to perform the action need. Energy in your muscles ultimately sources from adenosine triphosphate (ATP). There's a small amount already in the muscle that's good for a few seconds. There's creatine phosphate, which your muscle has a limited store of, which can be turned into ATP over the course of a few seconds. Glycogen is more plentiful, but it takes longer to process, and produces lactic acid in the process without oxygen. Lastly, aerobic respiration takes about two minutes to kick in, but can be maintained for a longer period of time, glucose being sourced from various parts of the body, and relatively easy to replenish on the go, the most obvious method being to consume glucose and other easily broken-down sugars.
In your case, it's possible that your energy stores are running out before you actually hit muscle failure. Taking a brief break gives your body a chance to manufacture more ATP, allowing you to push out a few more repetitions, but you're not generating ATP fast enough to overcome the amount of energy you're using. As Dennis notes, one option is to go for an overall number to be performed, accepting that there will be breaks, but trying to keep those breaks short so that you keep yourself on the edge. Another is to just refuse to let the first few failures happen. Even if you're not making it all the way up, or even only managing to hold yourself a few inches off of the ground while straining to finish pushing up, you're forcing your muscles to perform work, and furthermore, you're breaking through some mental barriers that normally stop you before you actually start getting the muscle tears. Lastly, you can "cheat", putting your arms up on a higher incline to decrease the strain or allowing your core to relax a bit. While not generally good to break form, it shifts the muscle strain to different areas, sometimes allowing you to finish exercising a muscle that was not exercised to failure because another part of your body failed first.
Lastly, DOMS (Delayed Onset Muscle Soreness) is not a reliable way to determine whether you've had a good exercise session and/or exercised to exhaustion. Sometimes, it just manifests itself as a sort of fatigue and looseness of the muscle instead of pain, and that's perfectly alright.