The attack occurred inside one of the security gates surrounding the heavily guarded base 60km north of Kabul.
The Taliban claimed responsibility.
Kabir Ahmad, Bagram district governor, said: "It was a suicide bombing. It took place between the main gate and the gate guarded by American soldiers.
Zemarai Bashary, an interior ministry spokesman, said: "Reports are stating that 18 people were killed and three of them are foreign soldiers.
Güncelleme Tarihi: 20 Eylül 2018, 18:16
"The 15 others are civilian Afghan workers who wanted to enter Bagram air base for their work. On injuries we do not have exact reports."
US military officials confirmed what they called a "direct attack" on the base.
A spokeswoman for Cheney said the vice president was safe.
Senior Master Sergeant Richard Simonsen in the Bagram media office told Agence France-Presse: "We have reports of one US soldier having been killed."
South Korea's defence ministry said a South Korean soldier was among those killed.
Sergeant Yoon Jang-ho was on guard duty outside the main gate to the base and was killed in the suicide blast, a ministry official said.
Al Jazeera's correspondent in Kabul, Samir Allawi, said witnesses saw the bomber on board one of the lorries carrying petrol into the base.
When the lorry was stopped for a security check, the bomber came out and blew himself up, witnesses said.
Allawi said journalists were being prevented from entering the base and the families of the victims had gathered in front of Bagram air base.
Qari Yusif Ahmadi, a spokesman for the Taliban movement, told Al Jazeera in a phone call that Abd al-Rahim, the attacker, was from Logar province, southern Kabul, the correspondent said.
The attack was targeting Dick Cheney, the US vice president, the spokesman added.
Cheney stayed at the base overnight after planned talks with Hamid Karzai, Afghanistan's president, were delayed by weather.
Later on Tuesday, the vice president arrived in Kabul to meet Karzai.
Cheney's visit comes as Washington warned that al-Qaeda and its Taliban allies were regrouping on Pakistan and Afghan soil.
The US has about 27,000 soldiers in Afghanistan, where it says defeating the Taliban is vital for its own security.
Last year was the bloodiest since the US-led forces ousted the Taliban government in 2001 for refusing to surrender Osama bin Laden in the wake of September 11.
Bolstered by money from record opium crops and safe havens in Pakistan, the Taliban have vowed a major offensive - including a dramatic increase in suicide attacks - in spring after the snows melt in coming weeks.
In Pakistan, Cheney pressed Pervez Musharraf, the president, to do more about Taliban and other militants using its territory for shelter and training.
Some 4,000 people were killed in fighting last year in the bloodiest period since the Taliban government was ousted in 2001.