Potatoes release starch when mixed and mashed, and having a gluey texture is due to an excess of it. Limit the amount of starch by using a ricer, food mill, or hand masher instead of an electric hand mixer, blender, or food processor.
According to SeriousEats, rinsing the potatoes “both before and after cooking” will also limit the amount of starch. This method will not only rid the potatoes of excess starch but will also further minimize the risk of ending up with a bowl of gluey mashed potatoes.
Unfortunately, gluey mashed potatoes can’t be reversed, but they can be modified into something else. The Kitchn recommends altering the dish by adding cheese, topping with breadcrumbs, and baking it — resulting in something closer to a gratin.