Immigration reform will happen, and the public has grown far too pessimistic on its prospects, Treasury Secretary Jack Lew told CNBC on Wednesday.

Lew said he believes lawmakers will come to a resolution on reforms languishing in Congress for the past year. After months of false starts, Lew said, there's now enough consensus among lawmakers to act.