The Reagan administration yielded to the Fairfax County Redevelopment and Housing Authority's demands yesterday and released $2.4 million for a controversial public housing project in the western portion of the county.

The authority had threatened two weeks ago to file a lawsuit against Housing and Urban Development Secretary Samuel R. Pierce Jr. to secure the funds. A terse, one-sentence statement from Pierce last night disclosed that his department had capitulated in the dispute just hours before the authority was to meet.

Federal housing officials approved the project--44 town houses on O'Day Drive west of Centreville--more than a year ago, but its funding was repeatedly held up because of opposition from Northern Virginia Rep. Stanford E. Parris and neighboring homeowners.

In return for the funds' release, the authority promised that HUD would pay no more than 42 percent, or $147,000, of the cost of building an access road to the project. The authority and developer will pay the balance of costs of the $320,000 road.

"We're extremely pleased that HUD has seen it our way," Gerald W. Hopkins, chairman of the Fairfax authority, said last night. Hopkins said he was sorry the authority had to threaten to sue, but "we were unable to break the logjam any other way."

The authority had retained the prestigious Washington law firm of Covington & Burling to prepare the lawsuit, prompting John F. Herrity, chairman of the Fairfax Board of Supervisors, to criticize the agency for "wasting money" on lawyers. Hopkins said last night he did not know the exact cost of legal fees but did not "think it was very much."

Parris, a Republican who has made an issue of his opposition to public housing projects in his current reelection campaign, said last night that he remained opposed to the project, but believed his opposition had helped lower its overall costs.

When Parris first intervened in the project in January, the estimated costs of the Barros Circle project were $3.1 million. The project has since been trimmed to $2.4 million.