Ralph L. Stanley, the Reagan administration's mass transit chief, agreed yesterday to provide $36.8 million in federal funds for construction work on the Metro subway system's long-delayed Green Line, describing the move as a "good faith gesture."

The grant, announced in a letter to Rep. Frank R. Wolf (R-Va.), was earmarked for work on the planned Shaw station, being built at Seventh Street NW between R and S streets. A spokesman for Wolf hailed Stanley's action as "a very positive first step."

Nevertheless, the release of the funds, which were part of a $250 million congressional appropriation for Metro in fiscal 1985, failed to settle a protracted controversy over the transit authority's plans for expanding the subway system.

Metro officials have sought to complete 89.5 miles of the proposed 103-mile system by the early 1990s. Federal officials recently recommended cutting off all further federal spending for Metro construction after the current fiscal year, throwing the authority's 89.5-mile plan into doubt.

Stanley has refused to release an additional $179 million in funds appropriated in fiscal 1985, citing Metro's failure to ensure completion of current construction projects. More than $200 million in federal allotments for Metro this year are embroiled in a similar dispute.

Officials said they released the $36.8 million yesterday to prevent violation of an existing contract for work on the Shaw station. Stanley also termed the Green Line the "most transit-dependent, cost-effective part of the system."