Most touchscreens use capacitive sensing. This uses two glass layers, coated on their inside surfaces with stripes of a transparent conducting material. On one layer the stripes run horizontally; on the other they run vertically. Each intersection acts as a tiny capacitor that stores an electric charge.
When you touch the glass, your finger distorts the electric field and changes the amount of charge the capacitors underneath it can hold. But this only works because your finger conducts electricity. With gloves on, your fingers are insulated and don’t distort the electric field.