The battle between Congress and President Reagan over how long U.S. Marines can stay in Beirut under the War Powers Resolution was joined gingerly yesterday as two ranking members of the Senate Foreign Relations Committee contended that the 1,200 troops must be out within 90 days unless Congress votes an extension.

"The clock began to run when the first Marines landed in Lebanon," committee Chairman Charles H. Percy (R-Ill.) told reporters after a closed-door meeting with Israeli Ambassador Moshe Arens.

Percy, in an apparent attempt to assert congressional authority over the Marine deployment without undercutting Reagan at the same time, said in another interview that Congress should not be "timid" about extending the Marines' stay if that seems advisable.

Sen. Joseph R. Biden Jr. (D-Del.) said the "tragic" killing of a Marine in Beirut yesterday by an Israeli shell that accidentally exploded demonstrated that the American force in Lebanon is in a hostile situation.

Percy, Biden and several other members of Congress are at odds with Reagan over whether the environment in Lebanon is dangerous enough to put the Marines under the 90-day limit imposed by resolution. The limit applies when American forces are "introduced into hostilities or into situations where imminent involvement in hostilities is clearly indicated by the circumstances."

In such a case the president could keep the troops deployed for 60 days without congressional approval and extend their stay by 30 days if he certifies that this is an "unavoidable military necessity respecting the safety of U.S. armed forces . . . . "

Reagan, in his letter to Congress Wednesday, tried to steer clear of the resolution's time-limit trigger by saying, "There is no expectation that U.S. forces will become involved in hostilities . . . . "

Committee member Larry Pressler (R-S.D.), who has opposed sending Marines to Lebanon as part of the international peace-keeping force, said "it was a mistake" for the president to claim "they were not going into hostile territory."

Rep. Lee H. Hamilton (D-Ind.), chairman of the House Foreign Affairs subcommittee on Europe and the Middle East, has been trying to pin down the administration on how long it intends to keep the Marines in Lebanon. He said last night that he still has not received a specific answer but that he suspects there is no set date.

About the Marine killed yesterday, he said "we knew there were risks" when the force was sent into Lebanon. He said the death was "to be deeply regretted," adding, "Along with the risks we have to look at the opportunities of the prospects of peace being enhanced by the presence of the international peace-keeping force in Beirut."

Several senators and representatives interviewed yesterday said they knew of no politically palatable way Congress could force the president to admit that the Marines are in the kind of hostile environment that imposes the 90-day limit under the War Powers Resolution. Trying to legislate new restrictions while the Marines are in Lebanon, one said, "would look like we're not supporting our boys."

Also, Congress will recess soon for the Nov. 2 elections, making it difficult to develop a legislative strategy for imposing the resolution's limits.

In remarks taped yesterday for a Chicago radio show, Percy said, "I do not believe we should be timid" about extending the Marines' stay in Lebanon beyond the initial 60-day period.

He was responding to a statement by Israeli Foreign Minister Yitzhak Shamir that the peace-keeping force might have to stay in Lebanon as long as two years to bring stability to that country.