President Reagan joined visiting Irish Prime Minister Garret FitzGerald yesterday in calling for passage of a pending $250 million program in economic aid for Northern Ireland and denouncing those providing financial aid to Irish terrorists.

In a statement celebrating St. Patrick's Day, the president called the Anglo-Irish agreement achieved last year by FitzGerald and British Prime Minister Margaret Thatcher "a ray of hope."

FitzGerald responded in a Rose Garden ceremony by praising Reagan for his support of the agreement and the aid program, approved by the House last week and expected to clear the Senate this month. It would provide $50 million annually for five years for economically depressed Northern Ireland, torn by sectarian disputes.

The Anglo-Irish Accord for the first time gives the Republic of Ireland a voice in the affairs of Northern Ireland in an effort to protect the civil liberties and security of the Roman Catholic minority there.

At a breakfast meeting with reporters, FitzGerald said that even Protestant Unionists who oppose the agreement approach the issue with a new "sense of reality." He predicted that the accord, to be reviewed in three years, will outlive him and Thatcher.

FitzGerald also said financial assistance for the Irish Republican Army from U.S. sources has diminished sharply. He joked that the amount of money coming from the United States is "just about enough to pay the fees" of lawyers who defend citizens charged with violating the law by supplying the IRA with arms.

Reagan, along with House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), has long been an outspoken foe of Irish terrorism, a position he reiterated yesterday.

He said that "concerned Americans can do two things to help make reconciliation a reality." The first, he said, is to aid the Irish economy through tourism and investments. The second is to refuse financial or moral support for Irish terrorists.

"Such support is misguided," he said. "We cannot permit individuals, for their own evil ends, to snuff out hope by the use of violence."

FitzGerald presented Reagan with a bowl of shamrocks and a two-foot crystal replica of the Statue of Liberty.