The Treasury yesterday directed American banks and other institutions holding $2.2 billion in frozen Iranian deposits or financial assets in this country to turn them over to the Federal Reserve Bank of New York by June 19 or face criminal or civil penalties.

The department's action is intended to begin implementation of the second phase of the agreement between the United States and Iran that led to the release of the 52 American hostages on Jan. 20.

On Feb. 26, the Treasury issued regulations for a similar transfer of funds but added that because of the outstanding legal issues surrounding the hostage-release agreement, it would not enforce any sanctions against those institutions that did not comply.

Yesterday's revised regulations removed that protection and represented an attempt by the Reagan administration to get its hands on the now-frozen funds one month before July 19, the date by which the second phase of the agreement is supposed to be fulfilled.

Officials said yesterday they needed that extra month in order to permit any court challenges to be completed by the deadline set in the agreement.

In its notice yesterday, the Treasury said that two United States Court of Appeals decisions handed down last month held in favor of the government's authority to order transfer of the funds and to suspend any claims by Americans against that money.

Under the agreement, the $2.2 billion is to be transferred by the U.S. government by July 19 by a formula that would send $1 billion to an escrow account now located in the Bank of England and the remainder to the Iranian government.

The escrow account would be used to pay any awards made by an international tribunal that is being set up to hear claims by American corporations and individuals for any losses they suffered after the Khomeini regime came to power in Iran.