A second explosion rocked another area of western Baghdad early on Wednesday, but there were no immediate reports of casualties.
Would-be recruits and soldiers were lined up by the entrance to the base at the disused al-Muthanna airport when a white Toyota Corolla sped to the gates and exploded in the first attack, witnesses said.
Colonel Adnan Abd al-Rahman, an Interior Ministry spokesman, said the blast at al-Muthanna base killed six and wounded 27.
A medical source at the nearby Yarmuk hospital said 28 people had been wounded.
A police source said the blast targeted people signing up for the Iraqi army.
The blast at 7am (0400 GMT) sent smoke billowing into the sky.
The area was sealed off and a police officer cordoning off the area said the blast was from a car bomb, but it was impossible to confirm independently.
The explosion was followed by a series of gunshots.
"It was a suicide car bomb. It was a white Toyota Corolla trying to get inside the entrance of the Iraqi army base. As he arrived, he blew himself up," said witness Husain Muhammad, who said he was 20 metres away when the car exploded.
"There were two soldiers lifted up into the air and knocked across the street," he added.
Most people lined up outside the base were protected by concrete blast walls, but people who were outside the protective barriers were killed or injured, he said.
Al-Muthanna airport, no longer used for flights, is home to US and Iraqi military bases. It has been the site of previous attacks.