On a Wednesday morning in late November, Atlantic City Mayor Don Guardian is just one event into a jam-packed day and already running late.

The 61-year-old politician hustles his way through the carpeted hallway of the city’s Sheraton Convention Center Hotel after a conference with other New Jersey mayors. He stops dead in his tracks when a woman—decked out in a silver sequin floor-length gown, full make-up, tiara, and sash—approaches from the hallway’s other end.

She’s the reigning Ms. New Jersey Senior, who is described on the pageant’s website as “60+” and a former cruise ship singer. Guardian, with arms outstretched, belts, “Welcome to my city, beautiful.”

Ms. New Jersey Senior thanks Guardian for his hospitality. “I was there when you were crowned,” he tells her. The pageant took place in June at Harrah’s Resort Atlantic City. “Then you heard me sing,” she says. He replies, “Yes, it was beautiful.”

Interactions like these make up a large portion of Guardian’s day. He stops and chats with just about anyone who crosses his path—valets, caterers, security guards, pageant queens. In his eyes, talking with people is the first step to solve any problem. It’s no wonder that as the unlikely mayor of downtrodden Atlantic City, Guardian—the city’s go-to ambassador, potential savior, and salesman-in-chief—hardly misses a beat.

In fact, he can’t afford to lose one. As casino after casino shutters and as the city’s swollen budget encounters even further strain, the prospect of New Jersey Governor Chris Christie bringing in an emergency manager to handle the city’s affairs seems increasingly possible. Indeed, Atlantic City Mayor Don Guardian has no time to waste.

A year after Guardian was elected to office as a Republican, house porches in the city’s Gardner’s Basin neighborhood still display “Democrats for Don” signs. They serve as a reminder that the most improbable of political victories did indeed take place.

In Atlantic City, Democrats outnumber Republicans 9-to-1. The city is 30% Hispanic and another 40% of its 40,000 residents are African American, including incumbent mayor Lorenzo Langford, whom Guardian ran against.

The demographics rendered Guardian—a white, Catholic, openly gay Republican—as the ultimate underdog.

As it turned out, Guardian’s affiliation with the GOP—“I’m fiscally conservative and socially liberal,” he’ll tell you—wound up being a huge asset. Langford, Guardian’s eventual opponent, went all out to win the Democratic primary and secured his party’s nomination with a reported $200 left in the coffers.

Meanwhile, Guardian pounded the pavement, knocking on some 3,000 doors and building an election war chest of $60,000.

The result? Guardian inched out a win in the election on November 5, 2013, securing 3,929 votes to Langford’s 3,568. The victory made him Atlantic City’s first Republican mayor in 23 years and inheritor of an unenviable task: turning around a gambling town that’s way down on its luck.

An East Coast resort town with a gambling problem

Modern-day Atlantic City sprang to life on Absecon Island in 1854 with the construction of the Camden-Atlantic City rail line, which transported East Coasters seeking beaches and a cool breeze from the Philadelphia area to the Atlantic Ocean’s edge. To meet tourist demand, mammoth hotels sprouted up along the shore, as did the famed boardwalk, which was first installed to contain the island’s swirling sand.

Prohibition in the early 20th century set off a tourism boom, as the city’s local officials all but ignored alcohol restrictions, spawning an era of lawlessness and the rise of notorious political boss Enoch Lewis “Nucky” Johnson.

In the 1950s, the growing availability of air travel meant East Coast residents could access the beaches of Florida and the Caribbean. Atlantic City fared poorly in the face of that competition, marking the beginning of the city’s post-War War II decline.

In hopes that table games and slot machines would rejuvenate the once-vibrant oceanfront city, Atlantic City legalized gambling in 1976. By 1987, the city was home to 12 casinos and the gross revenue they generated had increased from $134,073 in 1978 to more than $2 billion. The percentage of the city’s property tax revenues that came from casinos started at 9% in 1978 and rose to 64% a decade later. By 1998, they made up 80%.

But as neighboring Delaware, Pennsylvania, and Maryland began to embrace legal gambling as a revenue stream in the 1990s and 2000s, Atlantic City’s golden gaming age dimmed. Overall casino revenue fell from $5.2 billion in 2006 to $2.9 billion this year.

Four of the city’s 12 casinos closed in 2014: the Atlantic Club Casino Hotel in January, the Showboat in August, the Trump Plaza Hotel and Casino in September, and, perhaps worst of all, the Revel Casino Hotel, a gleaming glass tower that cost $2.4 billion to build in 2012, only to shutter two years later. The damage has cost the city some 8,000 jobs.

A fifth casino—the Trump Taj Mahal—had threatened to close, but it will stay open at least through early next year, thanks to a $20 million lifeline from its sole debt holder, Carl Icahn.

The city’s total assessed property value dropped from $20.5 billion in 2010 to $11.3 billion in 2014. And as their fortunes wane, casinos have made a habit of appealing for property value reassessments, which has exacerbated the city’s real estate decline. In just one example, the city reached a settlement in June to refund the Borgata Hotel Casino & Spa $88.3 million in property taxes that covered 2011 through next year.

While Atlantic City’s tax base has plunged, the municipal budget has ballooned, forcing property taxes up by 29% in 2014. Governor Christie has described Atlantic City’s government cost increases as “explosive.” Its public school system, for instance, spends $26,000 per pupil, $8,000 more than the New Jersey state average.

Hard times have taken a significant toll on the city’s residents. About 30% of Atlantic City denizens were living below the poverty line even before this year’s casino closures, according to Census data. In October 2014, 11.2% of the people living in the Atlantic City-Hammonton, New Jersey metropolitan area were jobless, compared to a nationwide unemployment rate of 5.8%.

The improbable candidate

Given the bleak picture, you can forgive Guardian for being an initially reluctant candidate.

Guardian says that supporters began to prod him to run for mayor some 23 years ago, but he waved them off. “I liked working with community groups, with like-minded people who raise money, [find] volunteers, and get the job done,” he says.

An ideal mayor, in his view, fits a particular profile: “Maybe in their late 50s. They’re happy with their life, socially, spiritually, business-wise. Kids are out of the house. And after 23 years, I became that person.”

The 61-year-old, who speaks in an almost breathless manner and moves about city hall just as quickly, lives in Atlantic City’s Northeast Inlet neighborhood on the island’s north end with his husband Louis Fatato, a spa manager at the Borgata whom Guardian met 20 years ago and married in July. Guardian, tall with a ring of white hair, is known for his impeccable wardrobe—tailored suits, a trademark bowtie, and a fedora in cold weather. His polished dress stands in stark contrast to his tendency toward relentless, albeit charming, chatter.

Guardian identifies as Roman Catholic and his vocabulary is sprinkled with religious references. For the record, he doesn’t gamble—“Only on my city,” he says. When asked to describe his sources of inspiration, he immediately recalls the Salesian priests from his high school, Don Bosco Prep in Ramsey, New Jersey, whom Guardian characterizes as “a very, very dedicated order of priests who helped boys become men.”

But personal circumstance alone did not convince Guardian to run for mayor. Frustration also played a part. “I was so upset that the Republican Party did not ever put anyone up who was viable for mayor, and I went up to one of their monthly meetings in the winter just so I could vent: ‘We have a great opportunity; we haven’t met any of the challenges. How come they’re not building housing, fixing roads? We should have a university in the city. We should have housing that we build,'” he recalls saying. “So, to that they said, ‘Why don’t you run?’”

Even after four casinos closed in his first nine months in office, Guardian maintains his optimism. “It all came crashing on my watch. I’m thrilled that it did. I’m not thrilled for the people who lost their jobs, not thrilled that we had to raise taxes this year and people are really suffering because of it,” he says. “But I do think that it woke us all up and said we can be much better.”

Guardian grew up in a bipartisan, pro-union family in Northern New Jersey. His mother, a seamstress and a member of the United Garment Workers Union, was an active Republican. His father, chief steward for a steamship line and a National Maritime Union member, was a Democrat. “Because of that,” he says, “I understand why individuals have chosen to have unions represent them in collective bargaining.”

Robert McDevitt, president of Unite Here Local 54, a union that represents Atlantic City casino workers, can attest to that. He says Guardian is “unambiguous” in his support of Atlantic City’s working people.

After graduating from now-defunct Upsala College in Essex County, Guardian sought a career in public service. “I ended college in 1975. If I’d ended it in ’73, I would have been working as a second lieutenant in Vietnam, so I felt it was my responsibility to serve.”

He decided to join the Boy Scouts. He’d been an active scout in his youth. In fact, he became an Eagle Scout. His first full-time job with the Boy Scouts was as a director of Camp No-Be-Bo-Sco in Northern New Jersey. He thought that he’d work for the Scouts for a few years. He ended up staying for 15.

It was the Scouts that drew Guardian to Atlantic City. He took a job as scout executive for the Atlantic Area Council for Ocean City and Atlantic County in 1989. His next 25 years in the city included a stint as executive assistant to the president of Claridge Casino Hotel in Atlantic City and, starting in 1993, a 20-year career with the special improvement district, where as director he was in charge of the appearance of Atlantic City’s tourism district—business facades, trash cleanup, and land- and street-scaping. He announced his candidacy for mayor in March 2013, launching his improbable road to city hall.

After all those years as a resident, one thing is certain: Guardian knows his city. “He knows every single street, every building. He’d know if a nail was missing from the boardwalk,” says Israel Posner, executive director at the Lloyd D. Levenson Institute of Gaming Hospitality and Tourism.

Guardian also makes it a point to be approachable. The mayor travels with an entourage of just two—his chief of staff Chris Filiciello, who worked in the George W. Bush administration, and a one-man security detail/driver. Earlier this year, Guardian told attendees at a legislative conference put on by the Southern New Jersey Development Council, “In February of last year, I realized that after 59 years of my life, I finally developed the courage to come out of the closet and admit—I was a Republican.”

Sizing up the challenge

Yes, Guardian has charisma. But, so far, that hasn’t translated into the action needed to steer Atlantic City out of the current that’s pulling it down—a bloated $261 million budget—according to Michael Busler, an associate professor of business studies at The Richard Stockton College of New Jersey who studies Atlantic City.

Before Guardian gets to next year’s budget, he may have to contend with a shortfall in this year’s. Michael Stinson, director of Atlantic City’s revenue and finance department, told Fortune that the city has failed to collect $31 million in taxes from the shuttered Revel casino, which is contributing to a $35 million budget hole.

Guardian is under particular pressure to cut the size of Atlantic City’s police and fire departments. A November report from Governor Christie’s Advisory Commission on New Jersey Gaming, Sports and Entertainment that generated proposals for revitalizing Atlantic City suggested downsizing the police department from 330 uniformed officers to 285 and shrinking the fire department from 260 to 180. Guardian says the city will hit those figures, in large part, by not replacing personnel lost to retirement and attrition.

Stinson says that next year’s budget should reflect significant reductions due to the city’s freeze on filling job vacancies. Filiciello said additional lay-off notices will go out to government employees after the New Year but declined to supply a specific number.

The potential budget shortfall and another drop in the city’s assessed property value—Stinson estimates it will decline from $11.3 billion to about $9 billion in 2015—would typically prompt an increase in property taxes. But whether such a hike is needed depends on the fate of proposed legislation that would let casinos collectively pay $150 million in place of taxes for two years.

The plan would help “casinos understand exactly what they have to pay,” by eliminating an unpredictable formula used to calculate a casino’s taxes based partly on its income, says Assemblyman Vince Mazzeo, a sponsor of the legislation who represents Atlantic City. Lawmakers in the state senate and assembly postponed votes on the legislation scheduled for mid-December because of the uncertain fate of the Trump Taj Mahal.

Guardian must face another gargantuan challenge: Bringing non-gaming businesses and new residents to Atlantic City. When it comes to encouraging newcomers, the mayor has to weigh the desire for business-friendly tax credits against the city’s desperate need for revenue.

“He doesn’t have any wiggle room with taxes because the budget is so tight,” Busler says.

In late October, Governor Christie designated Atlantic City a so-called Garden State Growth Zone, giving new non-gaming projects access to the state’s most generous development incentive: tax credits that equal up to 40% of a project’s capital investment. The city is also offering property tax abatements for new, non-casino construction. But it’s giving such breaks in exchange for payments in lieu of taxes—a tradeoff that gives the city access to a larger percentage of the money handed over, according to Elizabeth Terenik, whom Guardian hired in March as head of the city’s planning and development department.

Companies are starting to move in or expand. In October, Philadelphia developer Bart Blatstein bought the Pier Shops at Caesars, a 300,000 square foot mall that juts out into the Atlantic Ocean, for a reported $2.8 million.

The Flagship resort plans to upgrade its facilities and build a 6,000-square-foot deck overlooking a coming extension of the boardwalk and the ocean beyond. Bruce Kaye, CEO of FantaSea Resorts, which owns The Flagship, cheered the consolidation of what he called the “overbearing” casino industry.

Herman Saatkamp, president of Richard Stockton College of New Jersey, credits the mayor with helping the school purchase the closed Showboat casino at a bottom-barrel price of $18 million. As a non-profit, the college essentially operates tax-free, though it’s working with the city to determine its planned payment in lieu of taxes. This was Stockton’s seventh attempt to build a campus in Atlantic City since 2003.

Atlantic City needs these one-off projects, “rather than expecting one industry to come along and save the day,” says Terenik. As she drives down Atlantic Avenue, the city’s main drag, she talks about potential developments on just about every corner. “Over here, we have a surf shop and a run-down hotel, so the idea is that we connect those two and get the owner to do a surf-themed hotel … with outside showers and storage lockers.” The hotel just announced it will shut down for renovations January 1, but it’s not clear if the owner will take up Terenik’s suggestion.

In addition to plugging for infrastructure upgrades and real estate deals, Terenik is trying to figure out what non-casino industries would be the best fit for Atlantic City, where land is cheap and the labor pool is deep. A few options? A call or data center. “If it’s an industry that casino workers can move into pretty easily, it makes a lot of sense for us.”

Governor Christie could be the ultimate judge of Guardian’s role in the city’s turnaround—or further decline. In addition to suggesting spending cuts, the governor’s commission report recommended that Atlantic City bring in an emergency manager to oversee the municipal government, enact deep spending cuts, and likely usurp much of the mayor’s power.

When asked about a timeline for deciding on the issue, a spokesman for the governor would only say that the emergency manager was a recommendation and that the governor has made no final commitments. The governor’s office did not reply to a request for a comment on Guardian’s performance as mayor.

For his own part, Guardian is opposed to an emergency manager since the city already has a state monitor in place who has veto power over hiring, firing, and contracts.

The looming possibility of the arrival of an additional state overseer certainly puts Guardian under the gun, but the stakes for the new mayor have been high from the moment he declared his candidacy. A gold placard sits on his city hall desk that says, “I believe in miracles.” Guardian says it was an election victory gift from nuns at the city’s Our Lady Star of the Sea and St. Nicholas of Tolentine churches, claiming they had asked God for a miracle to save the city and considered him the answer to their prayers.

When asked about the prospect of living up to such lofty expectations, he smiles. “If you don’t have high standards, what else do you have?”