The shooting happened at about 6:30 a.m. in the 600-block of Adams Street, according to Gary police.
The Gary PD SWAT team was executing a search warrant after reports of narcotics sales in the area.
During the operation, police said someone ran out the back and allegedly "engaged officers with a firearm."
Officers started to shoot at the person, who later died, police said.
SEE ALSO: Man shot during robbery in Avondale: Chicago police
The man killed was identified by the Lake County Coroner's Office as David Martin, 46, of Gary.
He died from multiple gunshot wounds, the coroner said.
At one point, a large SWAT vehicle was in the middle of the street in the area.
"We heard a lot of explosions right after 6:30 this morning. I told the kids to get down. Right after the explosions we heard gunfire. My initial thought was to go downstairs to see what was going on. I walked out my back door. There was a man laying down. After I seen that, I told the kids to go back into the house. And then we've been in the house since then," neighbor Anthony Griffin said. "He's a neighbor of ours. When I'm out barbecuing, he was the guy that came by, said hello, went into the house, that's about it. As far as personal conversations, no. It was just 'hi' and 'bye' as neighbors."
The home where the shootout took place was still bearing the signs of a forced entry later Wednesday.
"The safety of our city relies on the partnership between our officers and the community," said Chief Cannon. "We ask residents to stay alert and report crime, because every tip brings us one step closer to a safer Gary."
The Lake County Sheriff's Department is now in charge of the investigation.