Melbourne United hold on to beat the Sydney Kings despite a huge second-half comeback effort.