First off, if you can avoid installing a gate on a slope, do it. Installing a gate on a hillside presents quite a few challenges and if it can be avoided try to install the gate in a flat area with as little slope as possible. In fact, installing a gate in a flat area can be challenging enough for the inexperienced. If you think about it, installing a gate on a hillside will present opening and closing problems. Depending on how you install the gate, it will most likely be interfered with by the hillside.
If you absolutely must install a gate on a hillside consider the following. Try and keep the gate as narrow as possible. The wider the gate, the more likely you are to run into operational problems. When installing the gate, think long and hard about how it will be swinging open and closing. Is it opening in a fashion that it will run into some sort of interference? If so you may have to make some modifications ranging from digging out the slope or creating a gap under the gate where it is interfered with. Also consider have the gate open on the downward side of the hill. In some cases this may not work but it is another option.
In conclusion, it is best to try and avoid installing a gate on a hillside but if unavoidable, test every option and consider interferences before finalizing the installation.