Prince William has sought to bring comfort to the families of seriously ill children from Gaza.