AUSTIN, TEX., NOV. 7 -- When it was all over, when the melodrama known as "Claytie and the Lady" finally ended, the only figure still riding high in the macho world of Lone Star politics was the Lady, Democrat Ann Richards, a resilient 57-year-old grandmother who awoke this morning as governor-elect of Texas and the most visible, if not the most powerful, female elected official in the nation.

Her come-from-behind victory over Republican Clayton Williams was so stunning that Richards's first words to herself this morning were, "This can't quite be real." She said she had to turn on the television and see the victory check mark next to her name to be sure that it was. She beat Williams 51 to 49 percent.

Not only did she pull it out after trailing Williams by 15 percentage points in the polls, but she won in convincing fashion, carrying upscale Republican Dallas, good-ole-boy east Texas and every section of the state except Williams's home turf out west.

The election outcome offered two divergent but equally compelling tales. One was the rise of Richards to an office of critical importance to state and national Democrats and to what is without question a starring role in the women's political movement.

"There will be a lot of little girls who open their history texts to see my picture -- I hope along with Barbara Jordan's -- and they will say, 'If she can do it, so can I,' " Richards said today, referring to the former Texas representative. "The significance is enormous. It is sociological change, not just governmental change. It means the doors are going to be open to everyone."

On the other side was the self-destruction of Williams, the millionaire oilman-cowboy who proved that no amount of money -- not even $9 million of his fortune and $20 million altogether -- can save a candidate from his worst instincts.

"She didn't win it so much as he lost it," said political scientist Jerry Polinard of the University of Texas-Pan American, reflecting the assessment of many Texas political observers. "It was kind of like the nightmare where the football player picks up the ball and starts running in the wrong direction. Williams started running three weeks ago, and he was going the wrong direction when he passed Richards yesterday."

After establishing a reputation for being loose-lipped and gaffe-prone early in the campaign, Williams did himself in with a steady series of late mistakes, shoving a massive bloc of undecided voters to the Richards column. Exit polls showed that nearly half the Richards voters made up their minds in the final month, a quarter in the last week.

First Williams called Richards a liar and refused to shake her hand at a televised luncheon in Dallas, an unchivalrous act that apparently turned the Republican women of north Texas against him. Then it became apparent during a television interview that he had no knowledge of the only consitituional amendment on the ballot, playing into Richards's contention that Texas needed a governor with experience and expertise in state affairs. And, finally, in a statement that hurt him deeply among the blue-collar voters of east Texas, he confessed he had not paid a cent of income tax in 1986.

Harrison Hickman, pollster for the Richards campaign, said interviews with prospective voters in focus groups in Dallas Oct. 4 convinced him that women of all ideologies "were ready, primed, to rally around Ann" after being "antagonized by chauvinistic remarks by Williams."

From then on, Hickman said, television consultant Robert D. Squier crafted commercials focusing on Williams gaffes, and Richards and her advisers looked for more opportunities to pound away on the notion that Williams was simply not up to the job -- opportunities that the self-proclaimed "good ole boy" from Midland amply provided.

Aides to Williams understood their dilemma, but were uncertain how to deal with it. "We had two choices," said consultant Bill Kenyon. "One was to keep the clamps on him. The other was to let Claytie be Claytie, and we knew we would hit some bumps along the way." They tried a little bit of both strategies, but the bumps turned into an insurmountable mountain on Election Day.

Richards, who entered elective politics as a county commissioner from Austin in 1976 and has served as state treasurer since 1982, is considered by most historians the first woman to be elected governor of Texas on her merits. Miriam (Ma) Ferguson served two nonconsecutive terms during the 1920s and 1930s, but she was considered a figurehead for her husband, Jim Ferguson, who had been impeached and was legally barred from office.

In her long and arduous campaign for the governorship, Richards hit several low points where her chances looked bleak. Perhaps the nadir came during her primary campaign when she refused to say whether she had used illegal drugs. As reporters pounded on the issue for several days, some members of her camp thought the race was over and a few suggested she withdraw. But, according to several sources, Richards remained determined to stick it out, and the firestorm eventually passed.

Reflecting on the most expensive campaign in American gubernatorial history, and one of the nastiest in modern times, Richards seemed almost wistful today. "In Texas, politics is a contact sport," she said. "It is not for the weak or the lily-livered."