Investigators say, when police arrived, the suspects were in the parking lot and fired at the officer. He was hit three times in the leg.
The man who pursued the suspects' getaway car said he went after them because "enough is enough".
Jose Santiago said he was driving by when he heard gunfire. Then he saw the officer who had been shot in the leg was not moving.
"Sometimes I don't think before I do I just do," he said. "And that's what happened today I just did."
Santiago called police and they were able to arrest the suspects in Gary.
Police say they recovered two handguns and cash.
The officer is said to be in stable condition.