sleeping is the gerund form----(sleeping=dormindo) to sleep=de dormer " I like to sleep on the floor" would be the correct English sentence to match with the Portuguese response that is provided.
No, you can never use the gerund after a preposition. Both 'to sleep' and 'sleeping' are acceptable translations of this infinitive.
Is "de" really required here?
"Eu gosto dormir no chao" sounds alright to me
no, it is not alright. "gostar" always goes with the prep "de". you can miss it only in short answers, like "gostam de vinho? sim, gostam."
eu gosto de dormir na terra. is correct 'no chao' is on the floor
Nope: "on the ground" can be used as "no chão" too. You cannot use "na terra", except if the ground is, literally, soil.
is "i like sleeping" infinitive? looks like a gerund to me...
"On the ground" to me implies earth, soil, camping, etc.