Stormont assembly members voted on the bill on Tuesday night after more than four hours of debate during its final stage in the chamber.
Alliance Party assembly member Nick Mathison, chair of the assembly's education committee, said "holiday hunger" remained a significant issue for many families.
He acknowledged Stormont's financial pressures but said the funding required for the bill was a "relatively small" proportion of the Department of Education's budget.
"When we are in a budgetary crisis we need to be ensuring that we do not end up penalising those who are least able to bear the costs," he added.
Ulster Unionist Party (UUP) leader Jon Burrows commended Baker on the sentiment of his private member's bill but warned "there is no funding stream and there is no money".
He said the bill "lacks any governance", adding: "There are no guarantees the money given under this will end up in nutritious meals inside the stomachs of children."
"It's a fundamental misapplication and misunderstanding of how the welfare system should work," he told assembly members.
Social Democratic and Labour Party (SDLP) assembly member Cara Hunter welcomed the bill, saying that "a child can't learn on an empty stomach".
"Hunger shows up in concentration, in behaviour and attainment long before it shows up in the spreadsheets or the speeches that we have before us here today," she added.