A wireless radio generates a set amount of power, which is directed to the antenna. The antenna's job is to radiate that power in a given direction. The antenna does not amplify the power to provide gain but simply focuses the power. Think of a flashlight with an adjustable beam. The flashlight only generates a given amount of light. By turning the lens on the flashlight, you can focus the light from a widely dispersed pattern to a much smaller and brighter beam. This is very similar to the way an antenna creates gain.
Omni-directional antennas emit a pattern somewhat like a tall donut. A cross-section of the pattern is presented in the graphic below.
Omni-directional antenna horizontal pattern
A higher gain antenna focuses the energy by compressing the pattern, which extends it outward. Think of a balloon filled with air. If you press the balloon on the top and bottom, it will squeeze outward becoming shorter and wider. The graphic below visualizes this same behavior when increasing antenna gain.
Imagine a circumstance in which the line-of-sight between antennas is obstructed by a tall building. This application may likely benefit from a lower gain antenna so that the pattern remains tall enough to radiate over the building, rather than a higher gain pattern radiating directly into the structure.
When selecting an antenna, you should focus on optimal gain, rather than maximum available gain. For more information on various types of antennas, gain and how to read the associated antenna patterns, check out the linked document below.
Links of Interest