The state is ordering National Grid to fix "severe billing errors" affecting thousands of its gas customers in Massachusetts.