The optical absorption of CdWO4 is reported at high pressures up to 23 GPa. The onset of a phase transition was detected at 19.5 GPa, in good agreement with a previous Raman spectroscopy study. The crystal structure of the high-pressure phase of CdWO4 was solved at 22 GPa employing single-crystal synchrotron x-ray diffraction. The symmetry changes from space group P 2/c in the low-pressure wolframite phase to P 21/c in the highpressure post-wolframite phase accompanied by a doubling of the unit-cell volume. The octahedral oxygen coordination of the tungsten and cadmium ions is increased to [7]-fold and [6+1]-fold, respectively, at the phase transition. The compressibility of the low-pressure phase of CdWO4 has been reevaluated with powder x-ray diffraction up to 15 GPa finding a bulk modulus of B0 = 123 GPa. The direct band gap of the low-pressure phase increases with compression up to 16.9 GPa at 12 meV/GPa. At this point an indirect band gap crosses the direct band gap and decreases at -2 meV/GPa up to 19.5 GPa where the phase transition starts. At the phase transition the band gap collapses by 0.7 eV and another direct band gap decreases at -50 meV/GPa up to the maximum measured pressure. The structural stability of the post-wolframite structure is confirmed by ab initio calculations finding the post-wolframite-type phase to be more stable than the wolframite at 18 GPa. Lattice dynamic calculations based on space group P 21/c explain well the Raman-active modes previously measured in the high-pressure post-wolframite phase. The pressure-induced band gap crossing in the wolframite phase as well as the pressure dependence of the direct band gap in the high-pressure phase are further discussed with respect to the calculations.