We have calculated an accurate exchange-correlation energy of a hole gas, including the complexities related to the valence band coupling as occurring in semiconductors like GaAs, but excluding the band warping. A parametrization for the dependence on the density and the ratio between light-and heavy-hole masses is given. We apply our results to a hole gas in an AlxGa1-xAs/GaAs/AlxGa1-xAs quantum well and calculate the two-dimensional band structure and the band-gap renormalization. The inclusion of the valence band coupling in the calculation of the exchange-correlation potentials for holes and electrons leads to a much better agreement between theoretical and experimental data than when it is omitted.