In most cases, gas is nothing more than a minor inconvenience. But sometimes gas can cause severe pain and affect the entire digestive system. This pain can radiate to the back, causing back pain and swelling. Minor problems in the stomach, such as stomach ulcers, can cause severe pain.