There was no immediate claim of responsibility for the attack in Jalalabad, the capital of Nangarhar province.
It was not clear if there were any casualties. A witness near the scene said that he could hear sporadic gunfire, suggesting the attack may be ongoing.
Several midwives have been rescued, provincial governor spokesman Attaullah Khogyani said.
Provincial health department spokesman Inamullah Miakhil confirmed its midwife centre had been attacked.
A witness in a nearby department said he heard several explosions and then saw three gunmen enter the lane where the midwife centre is located.
Jalalabad has been the scene of several attacks in recent months that have killed dozens.
Most of the attacks were claimed by the Islamic State group.