A bomber wearing an explosive vest entered Forward Operating Base Chapman in Khost Province, near Pakistan.
A Taliban spokesman has said one of its members carried out the attack.
In a separate incident, four Canadian soldiers and a journalist died when their vehicle was blown up in the south-eastern province of Kandahar.
It is the worst fatal incident affecting Canadians in Afghanistan for more than two years.
The journalist has been identified as Michelle Lang, 34, from the Calgary Herald, who had just arrived on her first assignment in the country.
The armoured vehicle the group were travelling in was touring local reconstruction projects.
An award-winning health reporter, her colleagues at the newspaper were said to have been devastated by the news of the death of Ms Lang, who was recently engaged to be married and described as bright, quick-witted and kind.
"We are all very saddened to hear this tragic news," Alberta Health Minister Ron Liepert said in a statement. "Michelle covered health issues with professionalism, accuracy and thoroughness."
The BBC's Lee Carter, in Toronto, says the deaths will add to the conviction felt by many Canadians that the country has carried a disproportionate number of casualties - the total has now reached 138 - especially in comparison to some European Nato allies.
A Taliban spokesman has said the group was responsible for the suicide bomb attack at Chapman Base.
Speaking to the BBC, Zabiullah Mujahid claimed that the bomber was also an Afghan soldier and was wearing uniform when he managed to breach security at the base.
Initially, the dead Americans in Khost were described simply as civilians, but they were later reported to be affiliated to the CIA.
The BBC's Kim Ghattas in Washington says the exact nature of their role is not year clear but some of those killed may have been contractors to the agency.
Reports suggested the attacker struck inside the gym at the base. It is not clear how many people were injured.
"We mourn the loss of life in this attack, and are withholding further details pending notification of next of kin," US State Department spokesman Ian Kelly said.
A spokesman for Isaf, the international Nato force in Afghanistan, said that "no US and no Isaf military personnel were killed or injured" in the incident.
Khost province - which is one of the Taliban's strongholds - has been targeted by militants over the past year.
The number of foreign civilians deployed in Afghanistan has been rising as international efforts there focus increasingly on development and aid.
Civilians work alongside military reconstruction teams at provincial bases around the country.
A "civilian surge" was one of the three core elements of the new US strategy for Afghanistan announced by US President Barack Obama at the beginning of the month.
This has been the deadliest year for foreign troops since the 2001 invasion.