The Senate, at the Reagan administration's request, voted narrowly yesterday to move the country a major step closer to resuming production of nerve gas for chemical warfare.

In doing so, it overrode vehement objections from Senate Appropriations Committee chairman Mark O. Hatfield (R-Ore.) who called the proposal "sheer madness" and asked, "My God, is there no limit to the voracious appetite of the miltiary machine that wants to suck up every dollar that we have here?"

Voting 50 to 48, the Senate agreed to go along with the House in adding $20 million to a supplementary appropriations bill to equip a munitions facility at Pine Bluff, Ark., so it will be capable of producing artillery shells to carry a new form of nerve gas theoretically safe in case of accidents.

Resumption of actual production of the so-called binary nerve gas would require presidential approval, as well as an appropriation for production that the adminsitration has not yet requested.

Letter from Secretary of State Alexander M. Haig Jr. and Defense Secretary Caspar W. Weinberger indicated administration support for a swift resumption of production.

The country has not produced any form of nerve gas since 1969, prompting proponents to argue that its value as a deterrent to chemical warfare has been dangerously eroded. Not to move ahead would amount to "unilateral U.S. disarmament in the chemical warfare area," said Armed Services Committee chairman John Tower (R-Tex.).

The proposal to equip the Pine Bluff plant was sponsored by Sen. John W. Warner (R-Va.). Harry F. Byrd Jr. (Ind-Va.) supported Warner, while Paul S. Sarbanes (D-Md.) opposed Warner's proposal. Charles McC. Mathias (R-Md.) did not vote.