The Mother Gum (not to be confused with the Gum or the Candy Kingdom) is a collection of living beings made of mutated bubblegum. First seen in "Simon & Marcy" as being scattered around the bombed-out surface area, sticking to mutants or humanoids, and giving the tools to Simon Petrikov he needed to feed Marceline chicken soup, not much is known about the Gum Hive's origins.
In the game Adventure Time: Explore the Dungeon Because I DON’T KNOW! the Mother Gum is hidden underneath the Candy Kingdom. Princess Bubblegum explains that the hive gestated her about a thousand years ago and blasted her out 827 years ago. She'd been protecting them there ever since.
Continuing with the events of the game, the Hive had seeped through the dungeon walls of the Candy Kingdom and accidentally released prisoners, leading Princess Bubblegum to send fighters to take them down and investigate the cause. She had realized too late that the Gum Hive was the cause, and tried to prevent the fighters from destroying it, but it was too late. The Gum Hive became unstable and dissolved as bubbles into the sky, ending its long existence.