There I was breezing around the state, Mr. Nice Guy," recalled Sen. John C. Danforth (R-Mo.) the other day. "Then all of a sudden . . . it was like running into a brick wall."

The wall that dazed Danforth earlier this month was a poll taken for The St. Louis Globe-Democrat showing that Democrat Harriett Woods had whittled his once-commanding lead down to nothing: 47 to 47.

Today the newspaper is to publish a new poll, taken Wednesday, showing that she has jumped to a lead of 49 to 45 percent among likely voters Tuesday, although Republicans say their latest polling indicates that Danforth still leads by 5 percentage points.

After the earlier poll, Danforth started flailing at Woods, calling her a "demagogue" on Social Security and describing some of her other positions as "radical" and just plain "crazy."

And he shifted the focus of his radio and television ads from a soft-sell pitch for himself to an attack on her as an advocate of big spending and high taxes, still gentle by comparison with the slashing exchanges of other 1982 campaigns but relatively tough stuff for Danforth.

No slouch herself with the hard punches, Woods, 55, a state senator with 20 years of experience in local and state politics, has eagerly incorporated the new situation into her campaign.

"The fact that he didn't know I was catching up indicates just how out of touch he is," she said, rubbing it in with an earnest, buoyant relentlessness that has brought her to the verge of one of the biggest potential upsets of the year.

Since she scrambled to the top of the heap with 45 percent of the vote in an 11-way Democratic primary contest last August, Woods has been hammering hard on her version of the differences between herself and Danforth, which Danforth, by his own admission, failed to challenge until the polls forced him to do so.

She hit at his strong record of support for President Reagan's budget, tax and defense programs, and accused him of voting to undermine Social Security, while stressing her own legislative record on nursing home reform, consumer issues, tax relief for the elderly and women's causes.

More subtly and perhaps as significantly, she has reminded voters of Danforth's wealth and social position, as an Ivy League-educated heir to the Ralston-Purina fortune and Episcopal minister-cum-lawyer, by pointing out her own "average" background as a working wife and mother who had to "struggle to balance a budget book." She also talks a lot about his votes for what she calls "the rich and corporate America."

"Harriett Woods couldn't be an aloof U.S. senator. She wouldn't know how . . . . Harriett Woods has never lost touch with the average Missourian. She won't in Washington," one of her campaign leaflets reads.

Some Woods supporters concede that Danforth, 45, has a friendly, easy-going manner, coupled with a reputation as a moderate, hard-working lawmaker, that made him popular among even some blue-collar voters in this normally Democratic state.

But being born rich during hard times can make things difficult for a Republican who's voted to cut programs for the poor and middle-class.

"There's a lot of class warfare in this," observed Danforth as he and an aide bounced over back roads in a predominantly Democratic blue-collar suburb near here. "I think it's being rejected by most people, but I don't really know."

At a high school that could be involved in a pending school busing suit, he drew cheers from students when he was asked about interracial busing, and responded that it was "probably the craziest idea I've ever heard of in my life," exposing what could be a vulnerable point for Woods in a close race.

Although she says she does not favor busing, abortion or gun control, single-issue groups have attacked her as soft on all three subjects, which spark strong emotions. State Republican leaders are exploiting the theme with materials calling her "Missouri's George McGovern."

The National Association for Neighborhood Schools, Inc., of Eastern Missouri and the National Rifle Association announced their support for Danforth this week.

The National Right to Life Political Action Committee has circulated leaflets supporting Danforth and asserting that Woods has accepted contributions from pro-choice groups and "the director of Missouri's largest abortion clinic."

With the economy hurting, but not as badly as it is in some midwestern states, Danforth continues for the most part to defend the Reagan administration's economic policies, which the Woods forces eagerly point out that he's done even more often on the Senate floor than has Sen. Jesse Helms (R-N.C.). But he indicates that he would trim defense more and social spending less.

Woods is the Democrats' only woman nominee for the Senate this fall, and she would be the only Democratic woman senator if she's elected. The earlier Globe-Democrat poll showed Danforth running stronger among men, Woods stronger among women, each canceling out the other's advantage.

Danforth expects to spend about $2 million to Woods' $1 million, which he may need to overcome the historical odds. Missouri, he notes, hasn't reelected a Republican senator in modern times.