Gain is not the be-all and end-all of antenna design -- far from it, as any antenna engineer will tell you. But you'd be hard-pressed to know that if spec sheets and marketing hype are your main sources of information.
Gain, usually expressed in decibels, indicates how well the antenna focuses energy from a particular direction as compared with a standard reference antenna. Because most spec sheets don't give a two- or three-dimensional radiation plot, the gain number specified is the value in the direction of maximum intensity. What that means is that if the broadcast stations you're trying to receive do not all line up like points on a single straight line from your home, you could have a problem with an antenna whose gain drops off dramatically from that sweet spot. Also, "gain" in this usage doesn't include losses from impedance mismatch. In practice, the antenna's performance will degrade if its impedance is different from that of the cable connected to it.
For these gain calculations, the reference antenna is often a half-wave dipole antenna, the most common type of antenna, which is composed of two metal rods, each one-quarter the length of the signal wavelength. The signal is taken from the antenna through a connection between the two conductors. The classic TV antenna is a log-periodic array of dipoles, with each dipole receiving a different VHF or UHF frequency.
When shopping for an antenna, consider the gain, but not to the exclusion of all other characteristics. Buying an antenna based on gain and price alone would be like going shopping for an automobile and considering only power and price; you might end up with a 500 horsepower engine attached to a skateboard. While higher values of gain -- in the 7- to 12 decibel range -- are usually better than lower values, most consumers will be better off not focusing on gain but instead purchasing a unit that provides good overall performance, as long as it meets their reception and installation requirements.
A family in rural Nebraska, for instance, might need a large, highly directional antenna, a tower of about 18 meters (60 feet), and a preamplifier to pick up stations, which would more than likely be located somewhere over the horizon. But that would be complete overkill for somebody living in Salt Lake City, where all the broadcast towers are on a mountain ridge just above the city with a line-of-sight path between most viewers and the tower. Anywhere near Salt Lake City you'll get great reception even with a small indoor UHF antenna.
Don't be fooled by claims of astoundingly high gain. Some manufacturers are marketing small indoor antennas and labeling the boxes with gain numbers between 30 and 55 dB. This kind of unit is actually an antenna paired with an amplifier, and the gain value stated on the package is really the gain of the amplifier and not that of the antenna. While it is possible to improve reception by using a well-designed low-noise amplifier, most of the inexpensive antennas designed this way actually have cheap amplifiers and too much gain. That combination generally overloads the amplifier -- and potentially the receiver as well -- causing signal distortion that can degrade or eliminate DTV reception entirely. Most consumers are better off with a well-designed nonamplified unit, also known as a passive antenna. If television reception does require an amplifier, the best choice is a high-quality, low-noise model connected as close as possible to the antenna.