Acting on a tip-off, police on Tuesday surrounded a dilapidated building in the city centre and began searching for the two suspects linked with the attacks, a senior officer said.
The two were asked to surrender, but instead the men opened fired with automatic rifles, forcing police to return fire, he said. The incident took place at around 4.30am (2300 GMT).
So far, 13 people have been arrested, including an engineer, a journalist, a computer software professional and a doctor, in connection with the July 11 strikes on the city's commuter trains and stations that also wounded about 700 people.
One of those arrested earlier gave police information about the hideout targeted on Tuesday, K P Raghuvanshi, Mumbai police's anti-terrorism squad chief, said.
Police intelligence
"For the last 8-10 days we had intelligence inputs that terrorists could be hiding in Mumbai," Raghuvanshi said. "Our suspicion is there could be more terrorists hiding in Mumbai."
An automatic rifle and a box of explosives were found at the site of Tuesday's shootout, Raghuvanshi added.
Indian security officials say the blasts were carried out by local Muslims who had links to Pakistan. They say the Pakistan-based Islamist militant group Lashkar-e-Taiba is a prime suspect.
The Pakistani government and Lashkar have denied any role in the attacks and Islamabad has offered to help India investigate the bombings.