Anyone who has turned a spadeful of unimproved Washington dirt and felt the withering heat of summer here knows this is no place to raise a vegetable.

"Hardpan clay, that's all that's under here," said Dave Gray yesterday as he worked his soil on the first day of the gardening season at Melvin Hazen Community Gardens on Sedgwick Street NW.

That rocklike yellow hardpan, coupled with Washington's annual summer drought, has turned tens of thousands of tomato plants to tinder in its time. So why did Gray's dirt look so dark and loose and promising on a sunwashed day, and where did he get his unbridled optimism?

The answer is horse manure.

Gray had it in green plastic bags, which he had hauled down from Rock Creek stables. He hoisted the bags with a flourish, dumped the rich contents out and folded them into his 10-by-20-foot piece of earth with a pitchfork.

Which is how it's been going at Hazen Gardens and the other half-dozen public victory gardens in the city for nearly half a century.

The National Park Service, overseer of the victory gardens since their inception in World War II as a way of increasing food production, has for decades encouraged use of organic fertilizers and has outlawed chemical poisons. "So the soil has been amended with organic material," said Gray, an aide to Sen. Gordon Humphrey (R-N.H.), "which is the best thing you can do for it."

The result over time was a granular, black loam that produces a bounty for even the most inexperienced tillers of soil.

"This garden owes a lot to the old-timers," Gray agreed. "They're the ones who built it up."

It also owes something to the park service, which has been trucking free horse manure and compost to the victory gardens every year so urban farmers had good stuff to work with, close at hand.

This year federal budget cuts forced the department to cancel the service, and gardeners will have to haul their own manure, although it's still available at the stables for free. This, Gray said, is a form of the "privatization" the Reagan administration encourages.

What effect the cutback in manure service will have on the long-term prosperity of Washington's public vegetable gardens is unknown. At the moment, these rich gardens are bursting with activity, which in short time will result in an explosion of life.

"Anybody who tries it can make a go of it," said Chris Miles, president of Hazen Gardens, who was digging his plot into humps of black soil as an experiment in raised beds. "It takes time and a little bit of luck, but basically if you pay attention to what you're growing you can't help but succeed.

"I didn't know anything when I started," said Miles, "but I go out every year with bushels of vegetables I can't eat, and sometimes can't even give away."

There are 84 plots at Hazen Gardens, which is a couple of acres in size. There's a waiting list for space, Miles said, but turnover is quick in this transient town. This year there are 21 new gardeners there.

Sometimes newcomers are overwhelmed by the fecundity.

Gabrielle Glang was starting her second garden this year. "Last year we had stuff coming out our ears," she said.

What will she plant this time?

"I have it all planned," said Glang. "Two kinds of watermelon, butternut squash, strawberries, artichokes, snow peas, onions, carrots, radishes, spinach, lettuce, okra, eggplant, red, green and yellow peppers, sweet peas, baby's breath, zinnias, marigolds and nasturtiums, plus an herb garden with garlic, oregano, dill, chives, sage, thyme, watercress and sorrell.

"My favorite question as a 5-year-old was, 'Can you eat this?' "