Comparing the Canon Powershots G3X vs. G5X, both can do RAW, but only the G5X can do HDR. My understanding is that I should be able to get all the effects of HDR with proper postprocessing of RAW photos. Is my understanding accurate? What do I get with a camera that can do HDR vs. one that cannot?
Yes and No.
Taking a single RAW, you have more dynamic range than a single JPG, so you have a limited 'high dynamic range', depending on the camera's capabilities.
For a less limited HDR, you need to do bracketing - you shoot a series of identical compositions, while changing exposure, for example -4, -2, 0, +2, +4. This allows you to compose those shots in post-processing, and thereby cover a much larger dynamic range.
Those bracket series could be JPG too; generally, using RAW is better, but it doesn't disable HDRs.
Many high-end cameras support this bracketing automatically.
An in-camera HDR operation can automate the process of creating images that express more dynamic range than a camera is capable of capturing with a single exposure.
The dynamic range a camera can capture with a single exposure is often expressed as stops. Because a change of one stop increases or decreases exposure by a factor of two, each stop of dynamic range equates (more or less) to one-bit. So a rough rule of thumb is: a camera with 12 bits of information in its RAW format has a dynamic range of 12 stops (in a perfect world and many other things being equal). 
On the other hand, the dynamic range of the jpg image format is (more or less) 8 bits or 8 stops.  This means that shooting in RAW allows capturing more dynamic range than is possible when shooting JPG and when post processing the RAW the photographer can pick and choose how the additional dynamic range maps into JPG or other 8 bit output.
The human eye has a static dynamic range of about 6.5 stops and so the roughly 6 usable stops of JPG can often represent the dynamic range of a scene as experienced by a human. However, the eye has a total dynamic range of over 40 stops and so a scene might have many possible experiences in human vision depending on which 6.5 stops of dynamic range a human is experiencing due to the condition of their eye (e.g. moving from dark to daylight or vice versa). Likewise the 12 stops of a RAW file are static and by adjusting ISO the camera can capture images across a wider range of lighting conditions (albeit only 12 stops at a time). JPG and other image formats can be thought of similarly. This makes specialties like astrophotography practical.
High Dynamic Range
HDR is a technique for simultaneously representing different portions of a scene as might be experienced by humans with their vision adjusted to various static dynamic ranges. For example the sky portion of a scene might be represented as might be experienced by a human eye adjusted to long exposure to bright light while other portions might be represented as might be experienced by a human eye adjusted to darkness.
HDR uses multiple images exposed to different static portions of a camera's total dynamic range. For example one image may be exposed to capture detail in the shadows and another exposed to capture detail in the highlights. The photographer can then choose how to combine the differently exposed images to express their photographic intent in the 8 stops of JPG's dynamic range.
In camera HDR simply automates the creation of multiple images at different exposures and combines them based on assumptions about photographic intent. These assumptions may or may not match a specific photographer's goals.
Like everything in photography, in camera HDR is a tradeoff that may or may not be useful for a particular photographer. My guess would be that in-camera HDR is a critical deciding factor for only a lesser fraction of photographers. And among those with a keen interest the tradeoffs of in camera HDR versus those of creating HDR images in post processing are a factor.
My intuition is that a tripod is probably more useful to creating HDR images than in-camera processing in many photographic situations because HDR uses multiple images. 
: Because the most and least significant bits map to black and white (which is which depends on the big or little endianness of the data format) it might be useful to think of 12 bits as equating to 10 stops, 8 bits as equating to six stops, etc.
: Though multiple cameras shooting simultaneously at different exposures is another way of automating HDR where a tripod may be of less benefit.
If your camera is capable of saving raw image data files to be used by a post processing editing application, then anything that can be done using an in-camera HDR setting can also be done using the same source files off camera.
When compared to a recent version of pretty much any HDR application the in-camera version will almost certainly be more limited with regard to the latitude of choices the user can make regarding how the raw data is interpreted in the final image.
In-camera HDR is a convenience feature. It takes the raw data from ever how many exposures it uses and converts the raw data in a way that uses more of the dynamic range from the raw image data to produce a jpeg than is normally the case when a single raw file is used to produce a conventional jpeg. It makes choices already programmed into the camera to interpret the data in the raw image file(s) a certain way.
Which gets better results, in-camera or post processing application, is a lot like the same comparison between in-camera jpegs vs. raw conversion in post processing: it depends primarily on the skill of the user and the capabilities of the application. For someone who doesn't have a lot of skill and experience, the camera will probably produce a better image. In the hands of a skilled photographer using a capable application, the post-processing option will usually produce better results. This is particularly true the more difficult and problematic the scene is.
No, that's not true. HDR means High Dynamic Range, it affects what difference in the level of light you can get without clipping effects. RAW just means that you can set the sensor multiplication afterwards, therefore you get the ability to set the brightness of the picture after shooting it, but only to a certain degree (same as with changing the ISO of your camera) without loosing detail, in contrast to a JPEG, where you lose a lot of detail whenever changing the brightness. Therefore you can be a bit more tolerant with your exposure settings when shooting RAW, because you get the ability to correct them afterwards. With an HDR-Image, you have less clipping in the dark and bright areas, but this does NOT affect how bright the image is in general. If you want to take images under extremely contrasty conditions, you need HDR, RAW won't help you.
Some Nikon cameras (elementary DSLRs) have an option named D-Lighting that adjusts the lighting in a single shot. That can be archived manually by post processing a raw image. Some mobile phone cameras have the same feature, but call that HDR! I don't think that is the case with that compact camera. HDR mode in G5X, takes 3 consecutive images and then combines them in a single image. If you want the same effect in post processing, you have to use bracketing to take multiple images with different exposures.