Gasly says he struggled with the issue over the last 15 laps of the Jeddah race, but he managed to keep going and finish in eighth place.
The Frenchman had run strongly in the first part of the race, behind the group consisting of Esteban Ocon, Fernando Alonso, Valtteri Bottas and Kevin Magnussen, but lost out by pitting just before the safety car.
Fighting back to finish in eighth place, the result came as a huge relief for the team following Gasly's fiery retirement in Bahrain and a terrible weekend in Jeddah for Yuki Tsunoda.
The Japanese driver could not take part in qualifying or the race, stopping on track with an oil pressure issue on the laps to the grid for the race start.
There was also a series of problems for Gasly this weekend, including clutch gremlins and floor damage, which meant, combined with the intestine pain, he was happy to gain points.
"I'm really happy, but it was very unlucky timing with the pitstop," he said when asked by Motorsport.com if he was relieved with scoring points.
"So we boxed, and literally as I came out of the pit I saw the safety car came out. So I dropped to P14 after that, and I managed to make our way back to P8. I think we can be happy.
"It's been the most painful last 15 laps of my entire career. I don't know what's happened with my intestine, but I was dying inside the car, I was screaming because of pain, and I'm just happy the race is done and we managed to secure the P8.
"On braking and every left corner I had the feeling like there was someone stabbing inside the intestine, so it was not nice.
"It was mainly on the right side, so I need to see the doctor. The last five laps it was just about surviving, and I was just massively in pain.
"So just counting the laps to the end, and that's why I'm happy we managed to finish the race in P8."
Gasly admitted that he was concerned by the series of problems suffered by the team in the early races, but he's confident there will be improvements.
"I must say it's been reliability-wise very difficult, the two first weekends," Gasly said. "The testing went so well, we were super confident.
"We lost some points in Bahrain, on my side. And then Yuki didn't qualify, and he didn't even take the start.
"So as a team, obviously it's quite painful to see that. But I'm confident within the team to find the solutions. We've been very reliable last year and the past few years, but clearly it's been quite tough for these first two weekends."