In terms of what this line represents in the poem, it describes a particularly horrific death that leads the narrator to the conclusion that the notion that "It is sweet and fitting to die for one's country" is a lie. The narrator, a young soldier in World War I, sees a fellow soldier who fails to put on his gas mask in time when chlorine gas is dropped. As the soldier's lungs burn, they fill with blood, so that he is actually drowning in this liquid. However, this death is not a quick one; it is the stuff of nightmares--the narrator's nightmares.
When the gas clears, they put the soldier's body in the back of a wagon. Still, he is not dead. The narrator says, essentially, that he can "hear, at every jolt, the blood / Come gargling from the froth-corrupted lungs" as the man's life slowly, painfully ebbs away. The only way there could be "froth" or "gargling" is if the man is still alive and attempting to breathe. And this image, of the soldier's eyes rolling around in the sockets and the froth bubbling from his mouth, bloody from the burns deep inside his lungs, compels the speaker to conclude that it is neither sweet nor fitting to die in such a way, not even for one's country. War is a bloody, terrible business that none but those who have experienced it can understand, and so the speaker, having witnessed the death in the line you cite, dismisses the romantic notion that death in war is somehow lovely and poetic.