A group of militants attacked a guard post and tried to force their way into the Badaber air base, Major General Asim Bajwa said on Twitter.
Eight attackers had been killed so far, he said, and 10 soldiers wounded."Clearance ops still underway. Searching for hidden terrorists," Bajwa tweeted.
A military official at the base, who asked not to be identified, said the gunmen opened fire on security guards as they tried to fight their way into the facility.
"All the terrorists were wearing explosives-laden jackets and were armed with hand-propelled grenades, mortars, AK-47 rifles," the official told Reuters.
"The Quick Response Force of the Pakistan army immediately responded and killed six terrorists before they could enter," he said.
Ambulances had taken around 20 wounded military personnel to hospital, said rescue official Bilal Ahmed.
Taliban spokesman Muhammad Khorasani claimed responsibility for the attack on behalf of the militant group.
"We proudly claim responsibility for the attack on Pakistani air base. This base is being used by fighter jets for bombing us," he told Reuters.
The number of attacks in Pakistan has fallen around 70 percent this year, due to a combination of a military offensive against Taliban bases along the Afghan border and government initiatives to tackle militancy.
That follows a massacre at a military-run school last December that killed around 150 people, almost all of them children.
Militants can still strike high-value targets even though attacks have decreased. The home minister of Punjab province and 15 others were killed in a suicide attack last month.