An estimate can be generated in number of ways.
One way is for all the work to be planned up front in sufficient detail to be able to know that you can assemble the target 'end-product.' Another way is for you to use analogy, such as using your experience to estimate the size of the work package. Simply put this is top down and bottom up estimating.
There are many techniques that you can add into these approaches including function point analysis, cocomo, monte carlo estimates, team velocity and so on. These techniques are beyond the scope of this post. What I want to focus on is the space between the top down and bottom up approaches to estimating.
In my experience - commercial projects from small (3 people, 3 months) to moderately large (30 people, 3 years) I think the real answer is a blended approach.
All estimates are made from experience and judgement. Balance your team's experience and judgement with countering views.
For instance many projects suffer the problem of overly large estimates pushing the project cost beyond the realms of valuable. Management will often push back with a 50% cut or similarly arbitrary approach.
If on the way to the end estimate you apply some top down constraints - say we have to have reached a valuable and tangible outcome within 3 or 12 months you can help guide estimating and planning decisions around functionality and performance criteria. Of course reasonable contraints need to come in from a value perspective; "We expect to invest this much time and effort for that much value." And that is where you analogous estimates are useful.
Of course, estimating is not a one way street in either direction. It's a collaborative effort by the project management team and the people on the team who need to do the work. Checks and balances, right?
And no making promises you can't keep.