Live updates: Follow the latest news on Israel-Gaza
The Senate on Tuesday confirmed Mr Lew's appointment by 53-43. Four members did not vote.
Congress rushed to confirm him to the post after the October 7 Hamas attack that killed about 1,400 people in southern Israel and saw about 240 people taken hostage.
"With Israel defending itself against Hamas, this ambassadorship is as important and timely as any nomination that the Senate has confirmed in a long time," Senate majority leader Chuck Schumer said after the vote.
Mr Lew had faced opposition from Republicans over his support of the 2015 Joint Comprehensive Plan of Action, a nuclear deal signed by world powers with Iran.
“I want to be clear: Iran is a threat to regional stability and to Israel’s existence,” he said during his October 18 confirmation hearing.
His appointment comes as Congress members are trying to provide financial aid to Israel.
House Republicans unveiled a $14.3 billion package on Monday, but that was rejected by Democrats.
Meanwhile, President Joe Biden's larger $105 billion emergency funding request faces opposition from most Republicans in Congress.
During his confirmation hearing, Mr Lew said he would ensure Israel that has what it needs to defend itself against Hamas.
“There is no greater mission than to be asked to strengthen the ties between the United States and the state of Israel, and to work towards peace in a region that has known so much war and destruction,” he said.
Mr Lew also pledged to work to secure the release of American hostages being held by Hamas and to prevent outside actors from escalating the Israel-Gaza conflict.
But his confirmation also comes as Mr Biden's administration faces questions over its unequivocal backing of Israel.
Israel has relentlessly bombed Gaza since October 7, resulting in more than 8,500 Palestinian deaths, including 3,500 children, according to the Gaza Health Ministry.
Civilians in the Gaza Strip have also largely been cut off from basic supplies such as food, water and fuel.
The White House has said that it is has pressed Israel to act within the international laws of war in its retaliatory strikes.
Mr Biden's administration also recently revealed that it pressed Israel at the weekend to restore internet access to Gaza.
State Department spokesman Matthew Miller said Washington was “pleased” when Israel agreed to do so.
The US has also urged more humanitarian assistance to be delivered to Gaza at a greater pace.