He could do it for sure. It was said somewhere that the Third knew all jutsus in Konoha. Why he didn't, however, confuses me. Why couldn't he open the first gate (strength) and second gate (healing) after Orochimaru stabbed him with the sword? Regain enough power to finish the seal and the healing may have prolonged his life enough even if he didn't get back enough power.