I've heard that too. The principal is that when you start chewing your brain thinks 'ah, theres some food on the way, I'll get the stomach juices going'. When the gum doesn't arrive, the juices (which are mainly hydrochloric acid) have to digest something, so start on the stomach lining, causing ulcers. However, although it sounds a reasonable theory, I have no idea if this is true or not!
It's a myth. Everyone seems to think that swallowing chewing gum will make it stay in your system for 7 years or something. It's all rediculous. The gum can't be used by your system, so will be removed just as fast as any other stuff that it can't make use of.
Maybe then we'd have less gum on the streets?
As rojash says though it's possible that chewing it could lead to highly than normal acidity levels, but it's not likely to do anything really.
Basically, you'll only get stomach ulcers if you have the acid in your stomach doing nothing for a period of time. As long as you're eating fairly regularly (3 meals a day, something like that), then chewing gum won't do anything at all.
You may get into trouble with chewing gum if you only eat once every few days however, but I can't see that affecting many people.