With all precincts reporting, Guardian was ahead by 162 votes out of more than 6,100 cast. Guardian is head of the city's special improvement district.
Guardian's campaign said that of the approximately 850 absentee ballots submitted in the election, 650 of them came from his campaign.
The Press of Atlantic City reports Langford said, "It's over," as he watched the final votes tallied.
Guardian would be the first Republican to lead the seaside gambling resort since 1990.
Langford previously ran the city from 2002 to 2005 and won a special election in 2008 and a full term in 2009.
Republican Gov. Chris Christie has frequently criticized Langford's leadership, including during Superstorm Sandy.