The "Girls" star's battle with endometriosis landed her in the hospital, but it also produced a wonderful friendship.