“Genius” (which means transcendent capacity of taking trouble, first of all).

Thomas Carlyle
Thomas Carlyle (1795–1881) Scottish essayist and historian
History of Friedrich II of Prussia, called Frederick the Great, Book 4, ch. 3 (1858–1865)
    (Source)

Usually misquoted as "Genius is an infinite capacity for taking pains," which is sometimes misattributed to Samuel Johnson.

See Doyle (1886).

See also more discussion here about the quote.