I know a lot of the people who are into the science of things will say "No connection," and leave it at that; but the practical issues are more complicated and they do bear some looking into.
They've done studies on it and there isn't any statistical link between autistic people and non-autistic people (especially people with other disabilities) and gastrointestinal problems. That is, we have them at the same rate as the general public. I know there are a few here who will disagree with me, but from all my research, anytime someone looks at it with numbers and statistical logic instead of with small numbers of case studies or anecdotes, you get that answer: Autism and gastrointestinal problems don't have a correlation, or if they do, it's a small one; and without a correlation, there can't be any cause and effect relationship (barring some extremely unlikely bad luck with confounding factors).
That said, though, when you have both at the same time, the whole can be more than the sum of the parts. Autism can have an effect on your gastrointestinal problems, and your gastrointestinal problems can have an effect on your autism.
If you have autism, chances are the limits of the input your brain can handle are much lower than the limits of an NT brain. Most of the time, there's only so much you can take before you start losing skills and not being able to cope. One kind of input comes from your digestive system--and what would be a non-issue for an NT can send an autistic person into shutdown.
From the other angle, autistic people can have hyper- or hyposensitivity that can interfere with treating gastrointestinal problems. If you are hypersensitive to texture and taste, you may easily end up with a restricted diet that isn't friendly to your digestive system--like a lactose-intolerant child whose restricted diet contains milk, and who consequently has the expected symptoms. Or you could be hyposensitive--not process the signals from your digestive system well enough--and be completely unaware that you had problems, except that you were feeling inexplicably more irritable and had less brainspace to work with.
With anybody who doesn't have access to workable communication skills, there's also the problem of not expressing pain the usual way--you might feel it and know you felt it, but be unable to explain it to your parents, who wouldn't have a clue because you weren't crying or making the usual "my tummy hurts" faces.