The parliament, dominated by members of the Islamist group, approved the cabinet line-up by 71 to 36 on Tuesday.
The cabinet was expected to be sworn in on Wednesday by Mahmoud Abbas, the Palestinian president whose long-dominant Fatah faction refused to join the new government.
Chanting "God is Greatest" after the vote, Hamas parliamentarians hugged and kissed Ismail Haniya, their prime minister-designate, who vowed not to abandon the fight against Israel.
One Hamas MP, Hamed Bitawi, said: "The Quran is our constitution, jihad is our way, and death for the sake of God is our highest aspiration."
His comments stood in contrast to a more conciliatory speech by Haniya on Monday in which he stressed the new government's push for peace and dialogue.
The earlier speech drew fire from some MPs for not stressing resistance.
Change of tone
In presenting the cabinet for parliamentary approval on Monday, Haniya sought to reach out to the West by saying his government was ready for talks with the "Quartet" of Middle East mediators on bringing a "just peace" to the region.
In contrast, on Tuesday, Haniya said: "We were born from the womb of resistance, we will protect resistance and the arm of resistance will not be touched."
Addressing Mariam Farhat, a newly-elected Hamas parliamentarian whose three sons died fighting Israel, Haniya said: "This the fruit of the sacrifices by martyrs, including your sons. You've got to be proud of this day."
"The Quran is our constitution, jihad is our way, and death for the sake of God is our highest aspiration"
Hamed Bitawi, Hamas MP
Israel seized on Haniya's change of tone, saying it reflected the new government's "extremist" policies.
Mark Regev, the foreign ministry spokesman, said: "I hope the sort of remarks we heard today help to dissolve any possible illusion that might exist as to the true character of this new Palestinian leadership."
After the vote, Haniya and several newly approved cabinet ministers prayed at the house of Sheikh Ahmed Yassin, the co-founder of Hamas who was killed by an Israeli airstrike in 2004.
"We are coming to congratulate you and to say that the blood of our Sheikh [Yassin] did not go in vain," Haniya told Yassin's widow.