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.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…