The justices are set to hear the case Tuesday.
A Hartford Superior Court judge ruled in December 2009 that a state law approved earlier that year violated the constitutional rights of legal immigrants by denying them medical benefits. The state appealed.
Lawmakers approved the legislation to save $9 million from a program serving about 4,800 immigrants who are elderly, disabled or are parents of needy children.
A 1996 federal law barred legal immigrants from receiving Medicaid until they had lived in the country five years. Connecticut had provided medical benefits to legal immigrants who'd been in country less than five years before last year's vote.