- Use a camera with a wide native dynamic range. This usually means a full frame camera. Although the same techniques can be used with smaller sensors, the results from single exposures will not allow as wide a difference between the highlights and the shadows.
- Expose for the highlights. Set exposure so that the highlights are right on the verge of clipping without going over. Sometimes this technique is referred to as exposing to the right (ETTR) because the right side of an image histogram shows the brightest levels of an image.
- Reduce general contrast, either with the in-camera settings before shooting or with raw files and post processing after the fact.
- Boost shadows, either with in-camera settings before shooting or with raw files and post processing after the fact.
- If the camera has a built-in "HDR" mode that can be applied to single exposures, the also use it. If the scene is static, one can choose to use a multi-exposure built-in "HDR" mode.
Obviously more advanced cameras, such as the Nikon D5 or the Canon 1D X Mark II that have more extensive in-camera contrast controls and allow adjusting the highlights and shadows independently of general contrast will allow better results when shooting straight to JPEG, as many press photographers are now required to do for "hard news" work.
Any reason to assume there was no polarizer and/or weak graded ND used for good measure in the picture shown?
It's far more likely any exposure gradient was done in post using masking techniques, if done at all. Pulling back the highlights while decreasing contrast and pushing the shadows can get much the same effect without having to bother with aligning the line on a graduated filter. There are too many things in front of the sky that are not also darkened. Due to the apparent wide angle of view and the direction of the shadows, it is doubtful a polarizer was used, as the sky would be darkened much more on the left side of the frame than the right.
Here's an example of an image where only adjusting contrast, highlights and shadows brings out the detail in the sky. No GND or polarizer needed. Using "HDR" tone mapping makes the effect even more pronounced.
What a straight out of camera JPEG with the camera set to use AWB, the Canon "Standard" Picture style, and both contrast and saturation at -1 (in camera setting) would look like. Lens correction and moderate sharpening which could have been applied in camera were also applied.
Canon EOS 5D Mark III + EF 24-105mm f/4 L IS @ 35mm. ISO 200, f/5.6, 1/400.
Processed with Canon's Digital Photo Professional 4

The same raw file processed with the contrast settings shown below. Minor CT, WB, and HSL adjustments were also applied. "Standard" Picture Style and Lens Correction were the same. Sharpening was increased slightly.

Additional tone mapping done using the HDR module of Canon's DPP 4.

