He spit (past tense) with great force and noise into the grate (metal or wood grating or lattice on the floor).
To spit at all indoors is considered rude, but to do it with any noise is considered very rude. It is sometimes taken as an insult, but I doubt that is its purpose here.