"(If) the preliminary reports are confirmed, such a tragic loss of life at the hands of our own forces is a cause for great and urgent concern," Gates said during a news conference in Washington. "And I can assure you that it will get this department's highest priority attention."
Initial reports indicated the shooter killed himself but military officials said a U.S. soldier suspected of being involved in the shooting at a clinic for soldiers suffering from war stress was in custody.
"Any time we lose one of our own, it affects us all," a military spokesman said.
At least three other people were wounded, CNN reported.
President Barack Obama was "shocked by the news of this incident and will press to ensure that we fully understand what happened at the clinic, and that we are doing everything we can to ensure that our men and women in uniform are protected," White House Press Secretary Robert Gibbs said.
Also on Monday, gunmen killed a senior Iraqi police official while he traveled to work in Baghdad, the Iraqi Interior Ministry said. Officials said two vehicles intercepted then fired on the car carrying to work Brig. Gen. Abdul Hussain Kadhim of the traffic police, CNN reported.
Police told the Kuwaiti news agency KUNA they discovered the bodies of three Iraqi citizens in the Tarmiya district of Saladin province. The three were kidnapped several days ago.