Catalyzes the hydrolysis of trehalose 6-phosphate to trehalose and phosphate; prevents the accumulation of toxic levels of trehalose 6-phosphate. alpha,alpha-trehalose 6-phosphate + H2O = alpha,alpha-trehalose + phosphate Binds 1 Mg(2+) ion per subunit. Ubiquitously expressed. Strong expression in intestine. Expression first seen at the 8E cell stage in the embryonic intestine. Expression continues to and includes adulthood. Beginning at the comma stage, additional expression is seen in the head and possibly in the hypodermis. By the twofold stage and continuing into adulthood, expression becomes increasingly widespread, with strong staining in the intestine, pharynx, hypodermis, body wall muscle, tail, and unidentified head neurons. Lethal at early larval stage. Mutant larvae show intestinal defects, and a high proportion exhibit gut obstruction (gob). No visible phenotype when gob-1 is down-regulated together with the trehalose phosphate synthases tps-1 and tps-2. Belongs to the gob-1 trehalose phosphatase family. Extended N-terminus.