Breast cancer continues to be a serious public health problem. The role of the hedgehog pathway in normal development of the mammary gland as well as in carcinogenesis and progression of breast cancer is the subject of intense investigation, revealing functional interactions with cell surface heparan sulfate. Nevertheless, its influence on breast cancer prognosis, and its relation to specific sulfation motifs in heparan sulfate have only been poorly studied in large patient cohorts. Using the public database KMplotter that includes gene expression and survival data of 3951 patients, we found that the higher expression of SHH, HHAT, PTCH1, GLI1, GLI2, and GLI3 positively influences breast cancer prognosis. Stratifying patients according to the expression of hormone receptors, histological grade, lymph node metastasis, and systemic therapy, we observed that GLI1, GLI2, and GLI3 expression, as well as coexpression of SHH and ELP1 were associated with worse relapse-free survival in patients with HER2-positive tumors. Moreover, GLI1 expression in progesterone receptor-negative tumors and GLI3 expression in grade 3 tumors correlated with poor prognosis. SHH, in a panel of cell lines representing different breast cancer subtypes, and HHAT, PTCH1, GLI1, GLI2, and GLI3 were mostly expressed in cell lines classified as HER2-positive and basal-like.