It's Denethor, talking about Gandalf's counsel to Gandalf and Faramir in his private chambers, just before the start of the Siege of Minas Tirith.
"You are wise, maybe, Mithrandir, yet with all your subtleties you have not all wisdom. Counsels may be found that are neither the webs of wizards nor the haste of fools."
LOTR, The Return of the King, Book 5, Chapter IV, The Siege of Gondor - page 86 in the George Allen & Unwin hb.