Much like the question of who killed Adena Watson, that of who did Gordon Pratt remains a mystery. If nothing else, however, the producers of the show have afforded the viewers a few subtle hints as to which character they'd have us *believe* was most likely responsible.
The events leading to Pratt's demise begin when Detectives Howard, Bolander, Munch and Felton enter an apartment building with a search warrant for the room of Glenn Holton, lead suspect in a recent child murder. Because of a typographical error on the warrant, though, they arrive at the wrong room, that of nearby resident Gordon Pratt. As they reach the door, someone from a stairway leading up to the next floor fires at them with two handguns. The fusillade of bullets rains down, wounding three of the detectives, Howard and Bolander critically. Holton is hunted and brought in, but during an interrogation with Detectives Pembleton and Bayliss, it becomes obvious that he's not the shooter. The detectives switch tacts to the investigation of the person whose room they'd accidentally approached--Mr. Pratt's.
Gordon Pratt is revealed to be an Oswaldesque loner who's frustrated by his lack of success in life and who believes that affirmative-action run amok is to blame for his various failures. He harbors a dislike of African Americans, one which he vents in passive-aggressive fashion, with snide remarks and "Bell Curve"-reminiscent assertions that it's a matter of biological fact that Blacks are, on average, less intelligent than Whites. Despite attempts to belittle Pratt to the point that he breaks down, the detectives fail to ellicit a confession. Pratt demands an attorney and is let free. It's not long thereafter that Pratt is found murdered near a pay-phone inside his apartment. Bayliss is unfortunate enough to wander into the squadroom at the time the call comes in and so becomes the primary.
Tim is hindered from the start, as the rest of the detectives on the shift, not surprisingly, either refuse to partner with him or quickly take other calls and vanish. Not only is he alone in the investigation, but the unpleasantness of the task multiplies when Lieutenant Giardello orders him to question the most likely suspects--his co-workers. Meldrick says that he was asleep ("Climbing into a bed with a poker pal," as he puts it), and, after some thinking, Pembleton that he was getting gas. Munch--who seems to resent even being asked at all--staunchly avers that, after visiting Detective Bolander at the hospital, he went to breakfast at Ikaros, a Greek restaurant. Bayliss remains suspicious of Munch and even goes so far as to talk to the Ikaros staff present on that morning. Those who were there on the morning in question can't recall him. Finally, armed--or burdened, rather--with this new information, Tim gently presses John, who hands his Glock over the Waterfront counter to his fellow detective, daring him to smell the chamber and see if it's been fired lately. Bayliss can't bring himself to do it, however, and hands the gun back to Munch, who takes it before stomping off to "make a call." It's all very suspicious appearing, at the very least.
Even unto the very last episode ("Forgive Us Our Trespasses"), Munch's name comes up in association with Pratt's murder. He tells Bayliss in no uncertain terms that killing someone like Pratt and getting away with it would be morally justifiable, and Bayliss mentions that, for all of these years, he'd always figured Munch the shooter. Executive Producer Tom Fontana mentions in his audio commentary to "Trespasses" that Richard Belzer believed the same, as well, and wanted viewers to draw that very conclusion.