This is the familiar myth whose growth was traced earlier in the blog. As I explained there, the theory is linked to the observation that many babies with colic pass a great deal of gas. This observation is accurate, but physicians who subscribe to the theory that gas is the cause are putting the cart before the horse. Babies with infant colic syndrome do not cry because they have gas: they have excessive gas because they cry so much.
One of the main sources of excessive gas is swallowed air. Babies who cry a great deal, for whatever reason, swallow a lot of air. Further, the action of increaseing abdominal pressure will cause gas in the rectum to be passed. If you look at strenuously crying babies, you will see that they indeed increase the pressure on the abdomen by hardening it: as a result, gas is passed from the rectum.
Any baby who cries for a significant amount of time for whatever reason will therefore build up intestinal gas and pass gas rectally. Clearly, it is the crying that causes the gas, not vice versa.