“Self-confidence is the first requisite to great undertakings.”
Johnson presents accurate confidence in one's own powers as necessary before attempting difficult work, while the next sentence warns that confidence formed without comparison to real ability can still be mistaken.
Source note: The Lives of the Most Eminent English Poets, “Pope”; Wikisource transcription of Johnson's Life of Pope. Johnson writes the sentence while discussing Alexander Pope's early estimate of his own abilities and immediately qualifies it by warning that isolated self-estimation can err.