A complicated urinary tract infection is an infection of the urinary system that occurs in patients with underlying anatomical or functional abnormalities, such as kidney stones, urinary retention, or structural defects. These infections typically require more aggressive treatment and investigation than uncomplicated UTIs.