The law is hard to enforce
Lets look at what the law prohibits - paying different rates of pay for the same work based on gender. Does that mean that two workers doing the same work must be paid the same? No, it just means that the reason for the difference cannot be based on gender. For example, one worker may be more productive than the other, or a better negotiator, or have been employed longer, or etc. etc. None of these reasons is prima facie gender based (although some may contain inherent gender bias) and all of them would be a defense to a business alleged to be breaching that law - remember the government must prove that the reason for the difference is gender.
Notwithstanding, most employers comply with the law and pay women equal rates to men for the same work all else being equal.
Causes of the gender pay gap
The gender pay gap is a cultural problem, not a legal one. From the European Commission's web page, different rates for the same work "explains a small part of the gender pay gap, due to the effectiveness of the European Union and national legislation."
They list 4 causes that are much more significant:
The undervaluing of women's work - "Jobs requiring similar skills, qualifications or experience tend to be poorly paid and undervalued when they are dominated by women rather than by men. For example, the (mainly female) cashiers in a supermarket usually earn less than the (mainly male) employees involved in stacking shelves and other more physical tasks."
Segregation in the labour market - "Women and men still tend to work in different jobs. On the one hand, women and men often predominate in different sectors. On the other hand, within the same sector or company women predominate in lower valued and lower paid occupations." For example, doctors are paid more than nurses, plumbers are paid more than hairdressers and store-persons are paid more than cashiers - guess which jobs have traditionally been and still are male and female dominated?
Traditions and stereotypes - "While around 60% of new university graduates are women, they are a minority in fields like mathematics, computing and engineering. Consequently, there are fewer women working in scientific and technical jobs. In many cases this results in women working in lower valued and lower paid sectors of the economy." I work in construction, when I studied electrical engineering in the 1980s there were 3 women in a year of 47 students; there are now more female engineers and architects then there were but there are still far more male ones. In terms of actual construction workers, the number of female builders, electricians, tilers and bricklayers I encounter is approximately none.
Balancing work and private life - "Family, care and domestic responsibilities are still not equally shared. The task of looking after dependent family members is largely borne by women. Far more women than men choose to take parental leave. This fact, together with the lack of facilities for childcare and elderly care, means that women are often forced to exit the labour market."
These are cultural and structural issues in society and the economy - they are highly resistant to legal solutions.