Today's gas fireplaces operate with a sealed combustion system. This means the venting system provides combustion air from the outside, not your room. This venting system may go through a side wall or up through the roof, or, in the case of a gas insert, it is installed in the existing fireplace's chimney. Smoke and other by-products from combustion are also sealed within the venting system and are effectively moved outside.
Of course, a blower fan will provide warm air to your room but is never in contact with combustion gases. It's unlikely that a gas fireplace is going to be the cause of headaches. However, you may experience unpleasant odors if pet hair and/or dust accumulates beneath the fireplace. These odors might cause a headache, as the fan can move those warmed-up smells into the living room. The answer to those unpleasant odors is to keep the compartment beneath the fireplace clean.