The attacker struck a market located hundreds of metres from the provincial governor's compound where Ghani was holding meetings, governor spokesman Attaullah Khogyani told AFP.
Of the 19 killed, 17 were Sikhs and Hindus, provincial health director Najibullah Kamawal told AFP. Another 20 people were wounded in the attack.
Eight killed as suicide bomber targets Afghan clerics in Kabul
Avtar Singh, the only Sikh candidate running in the October 20 parliamentary and district council elections, was among the dead, an Indian embassy official said. In a statement the embassy condemned the "cowardly terrorist" attack.
The attack was claimed by the Islamic State group.
There were scenes of anguish at the hospital where grieving relatives wept and hugged each other as they waited for news of their loved ones.
Suicide attack in eastern Afghanistan kills 14: official
"It is over for us, we are finished, they have massacred us, at least 10 of us," a man told AFP, too upset to give his name.
Small communities of Sikhs and Hindus reside in what is otherwise an overwhelmingly Muslim nation. It is not clear if they were the intended target of the attack.
Interior ministry spokesperson Najib Danish confirmed a suicide bomber carried out the attack — the latest in a series of recent deadly assaults in the restive province.
Ghani's spokesperson said the president was still in Nangarhar but was "away from danger".
Ghani arrived in Jalalabad earlier on Sunday to open a hospital, part of a two-day visit to the province bordering Pakistan.
The attack came a day after Ghani ordered Afghan security forces to resume offensive operations against the Taliban following the expiry of the government's 18-day ceasefire.
The government's unilateral truce overlapped with the Taliban's three-day ceasefire for Eid, but the militants refused to prolong it.
'Third bomber' in Benazir assassination plot denies involvement, blames Musharraf
The unprecedented ceasefire over the holiday capping Ramadan triggered spontaneous street celebrations involving Taliban fighters, security forces, and war-weary civilians.
But it was marred by two suicide attacks in Nangarhar that killed dozens of people and were claimed by IS, which has a smaller but relatively potent presence in Afghanistan.
IS was not part of the ceasefire.
The attack comes as US envoy Alice Wells visits Kabul as part of efforts to ratchet up pressure on the Taliban to engage in peace talks.
The Taliban have so far ignored Ghani's offer of peace negotiations. Instead, they have insisted on direct talks with the United States, which Washington has repeatedly refused.
Three Afghans beheaded, school torched in suspected Islamic State attack
Wells said that since the Afghan government and United States were willing to start talking without preconditions, the onus was now on the Taliban to respond.
"Right now it's the Taliban leaders... who aren't residing in Afghanistan, who are the obstacle to a negotiated political settlement," Wells said in remarks embargoed until Sunday.
Wells, who is due to hold talks in Pakistan on Monday, said Islamabad also needed to do more to squeeze the Taliban and get them to the negotiating table.
"Pakistan has an important role to play... but we have not yet seen that sustained and decisive action on the part of Islamabad," she said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ