We report on the coordinated observations of the neutron star low-mass X-ray binary (NS-LMXB) GX 5−1 in X-rays (IXPE, NICER, NuSTAR, and INTEGRAL), optical (REM and LCO), near-infrared (REM), mid-infrared (VLT VISIR), and radio (ATCA). This Z-source was observed by IXPE twice in March-April 2023 (Obs. 1 and 2). In the radio band the source was detected, but only upper limits to the linear polarization were obtained at a 3σ level of 6.1% at 5.5 GHz and 5.9% at 9 GHz in Obs. 1 and 12.5% at 5.5 GHz and 20% at 9 GHz in Obs. 2. The mid-IR, near-IR, and optical observations suggest the presence of a compact jet that peaks in the mid- or far-IR. The X-ray polarization degree was found to be 3.7%±0.4% (at 90% confidence level) during Obs. 1 when the source was in the horizontal branch of the Z-track and 1.8%±0.4% during Obs. 2 when the source was in the normal-flaring branch. These results confirm the variation in polarization degree as a function of the position of the source in the color-color diagram, as for previously observed Z-track sources (Cyg X-2 and XTE 1701−462). Evidence of a variation in the polarization angle of ∼20° with energy is found in both observations, likely related to the different, nonorthogonal polarization angles of the disk and Comptonization components, which peak at different energies.