Kate Middleton has made a surprise visit to the hospital where she was treated for cancer last year in a rare public outing.