Montgomery County legislative leaders, who gave their highest priority this year to winning $40 million in state money for new roads and schools, all but conceded defeat today at the hands of a General Assembly unwilling to fund costly capital projects in the affluent suburb.

Almost all the money is being sought to ease Montgomery's growing pains north of Rockville, the upcounty area where population and business development has exploded in recent years.

"It's going to be very, very difficult to walk away with everything the county wants," declared Sen. Laurence Levitan (D-Montgomery), chairman of the powerful Budget and Taxation Committee, which holds the Senate purse strings for all state construction programs.

Levitan predicted that Montgomery will secure at most $7 million for new school construction because of competition here from other jursidictions. "The legislature feels sorry for Baltimore City," he said, referring to $10 million in education and police aid for Baltimore that his committee is expected to approve by next week.

"The legislature doesn't feel sorry for Montgomery County," Levitan said in an interview. "If I say Montgomery County is hurting, they're going to laugh at me."

Levitan's bleak outlook on Montgomery's request for record amounts of state construction money surfaced today at a breakfast meeting with other county senators. It touched off a bitter argument with the delegation chairman, Sen. Sidney Kramer, who has complained in the past that Levitan has not been aggressive enough as committee chairman in winning more money for the county.

At one point in the meeting today, when Levitan suggested that Montgomery would probably obtain only a "minimal" amount of road and school funding, the normally mild-mannered Kramer responded with a one-word profanity, according to several witnesses.

Kramer repeatedly argued that the $40 million in state construction bonds is urgently needed to ease school and transportation problems.

Levitan countered by saying that county officials realistically could expect only a few additional state dollars and should be grateful for the recent decision by the state to accelerate the widening of I-270 and spend $3.8 million to improve Rte. 28, a key commuter road.

"So far we've seen absolutely no sign of help" from the legislative leadership of the House and Senate, a dejected Kramer said in an interview. "As political commitments are being made, Montgomery County is being ignored."

Kramer, Levitan and other Montgomery senators are scheduled to meet Friday with Senate President Melvin A. Steinberg (D-Baltimore County) to press for his assistance in the coming struggle for construction dollars. Both Steinberg and House Speaker Benjamin L. Cardin (D-Baltimore City) have said during this session that they would consider Montgomery's appeals.

The pessimism expressed by Kramer and Levitan contrasts sharply with their generally upbeat mood of mid-January, when County Executive Charles W. Gilchrist traveled to Annapolis and urged Montgomery legislators to shed their traditional "defensive" strategy and make an unprecedented appeal for state funds.

Montgomery is seeking more than $14 million to widen Rte. 355 north of Gaithersburg and $11 million to improve Rte. 118 in Germantown, both heavily used commuter roads in the I-270 corridor. The county also asked for $14 million to finance two elementary schools and to modernize five other schools.

The roughly $40 million request, which would be funded by the sale of state-issued bonds, was the largest ever initiated by the county government, which in the last 10 years has sought and won a total of $7 million in state bonding.

Because of the state's current $220 million limit on capital bond projects for 1986, there will be only $10 million to $12 million available for essentially local projects throughout the state, Levitan said today.

"I'm getting a lot of heat from my colleagues who think I have the ability to pull $40 million out of a hat," Levitan said. "But I'm not a magician."