In the southeastern Spanish region known as the Levant, the parish church of the village of Dolores will have a new roof year, thanks to the generosity of an elderly woman who spent most of 1980 begging outside its ancient portal.

In the nearby village of Benejuzar, the tiny local Communist Party cell plans to move out of its run-down rented offices and start 1981 with the purchase of decent premises In palma, on the Mediterranean island of Majorca, the youth who cleans the Hertz rental cars at the international airport is poised to buy a luxury apartment for himself, and his wife and infant child.

They are some of the lucky ones who have received the windfall of the Spanish Christmas lottery -- reputedly the world's biggest gamble, with staggering payouts at stake.

For a country where progressive income tax is a new phenomenon and where social mobility lags behind that of fully industralized Western Europe, the lottery represents a breathtaking redistribution of wealth.

Full tickets for the lottery cost 25,000 resetas (just over $400) and just about every Spaniard had at least a small stake in a ticket. In this lottery, an estimated $24 was gambled for every man, woman, and child in Spain's population of 36 million. Prize money totalled $550 million and all eyes were set on the seemingly impossible dream of cashing in on the 39 top prizes paying out $3.1 million for each full ticket.

As the celebratory champagne bottles dried out, and while bankers, speculators, and journalists scoured the country to contact the winners, foreigners could be forgiven for feeling perplexed."The country is grinding itself into debt, the jobless rate stands at a record high, and everyone is buying lottery tickets," observed a bemused American financial analyst in Madrid.

The ceremony held yesterday, when the lottery was drawn, was indeed strange by most standards. Hunderds packed an official building in Madrid where a dozen 12-year-old boys, nattily dressed in dark suits and bow ties, all of them pupils at a local orphans' school, held the stage in front of two giant electronically operated orbs that contained numbered table tenns balls. One orb held balls with varying amounts of prize money printed on them, and the other, balls indicating a ticket number. As the spinning orbs came to a halt, one boy would plunge in his hand to pick out a number while the other picked out the corresponding prize money. Then the orbs would start spinning again as the lucky number and the prize were read out in a nasal singsong chant.

The whole mesmerizing stage piece, lasting nearly three hours, was covered live by Spanish television and radio. When the top prize was announced, everyone knew instantly -- the gordo (the "fat one," as the top payout is affectionately called) had come up.

In Madrid it made for gloomy pre-Christmas faces. Always the biggest gamblers in the lottery, the Madrilenos discovered that the top prizes had gone to the Levant and to the Mediterranean island. But even as they counted their losses, there was not the slightest doubt that gambling would be almost as heavy again in a consolation lottery scheduled for Jan. 3 in time to distribute the payouts for the Epiphany, when Spaniards (who have always preferred the Three Kings to Santa Claus) exchange their gifts.

Spanish newspapers contemplating the hysteria generated by the gordo marked it up as one more indicator of the country's economic ill-health. In the same week the government announced a trade deficit of $11.9 billion, double last year's. The pet conversation subject of every banker and businessman in Spain is the zero growth rate and the rock-bottom investment.

Winning the lottery is the short cut to everything. Savings and even food and rent money are happily gambled, if only to savor the thought of extraordinary riches. Maria Garcia, the beggar outside the church in Dolores, was given $6 by the parish priest last week to see her through Christmas. She promptly bought a share in a ticket, won $400,000, and promised her benefactor she would put the church's roof right.

The 40 members of the Communist Party cell at Benejuzar won just over $1 million Top priorities were new premises and a cataract operation for the wife of Manuel Ruiz, the 80-year-old local party secretary.

Jose Enrich, the Hertz car washer at Palma airport, was virtually incoherent when interviewed by the state radio. Enrich, after learning that he had won more than $200,000, said he would certainly buy an apartment and perhaps a car but, "mindful of how the economy is," would stick to his job because "multinationals don't go bankrupt."