The authoritarian president for 22 years will be replaced by property developer Adama Barrow, who won more than 45% of the vote.
Yahya Jammeh, who came to power in a coup in 1994, has conceded, said electoral commission chief Alieu Momar Njie.
Before announcing the final result, Alieu Momar Njie appealed for calm as Gambia entered unchartered waters.
The African country has not had a smooth transfer of power since independence in 1965.
Mr Barrow won 263,515 votes (45.5%) in Thursday’s election, while President Jammeh took 212,099 (36.7%), according to the electoral commission.
Adama Barrow, who runs his own property company, reportedly used to work as a security guard at an Argos department store on London’s Holloway Road.
On the electoral campaign, he promised to revive Gambia’s economy, which has forced thousands of Gambians to make the perilous journey to Europe.
A devout Muslim, Yahya Jammeh, 51, once said he would rule for “one billion years” if “Allah willed it”.
Human rights groups have accused Yahya Jammeh, who has in the past claimed he can cure AIDS and infertility, of repression and abuses.
Several previous opposition leaders are in jail after taking part in a rare protest in April.
Observers from the EU and the West African regional bloc Ecowas did not attend the vote.
Gambian officials opposed the presence of Western observers, but the EU said it was staying away out of concern about the fairness of the voting process.
However, the African Union did dispatch a handful of observers to supervise the vote.
The Gambia, a tiny country with a population of fewer than two million, is surrounded on three sides by Senegal and has a short Atlantic coastline popular with European tourists.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…