Leakes said Gregg went to the hospital in May after experiencing "excruciating pain" in his stomach. He was diagnosed with colon cancer and underwent emergency surgery to have part of his colon removed.
"We just weren't prepared to hear that," Leakes said of her husband's diagnosis.
Gregg also discussed his diagnosis in a prayer group meeting during the episode.
"I guess the scariest part about all of this [was] when we got to the hospital and the doctor saying, 'We need to do surgery on you tonight or else you're not going to make it.' I went over and prayed to God and I said, 'If it's time, let's go,'" Gregg shared.
"I wrote a note to my doctor and I told him to give it to you if I don't come out," he told Leakes.
"You never know what's in you until you're at that door. I never thought I had it in me to fight cancer. Now I'm going to beat cancer."
FOLLOW REALITY TV WORLD ON THE ALL-NEW GOOGLE NEWS!
Reality TV World is now available on the all-new Google News app and website. Click here to visit our Google News page, and then click FOLLOW to add us as a news source!
Leakes praised Gregg in an Instagram post Sunday for sharing his story on the show.
"I was surprised about how much @greggleakes opened up his situation for all to see! He holds back NOTHING this season in an effort to help the next person!" the star wrote.
"This hasn't been a walk in the park for neither of us but as long as we're holding hands walking this journey together Gregg, that's all I will forever need!" she said. "#ingodhands #proudofyou #yougotthis #lifeoftheleakes."
Leakes told fans in June that Gregg was fighting cancer but did not share details about his specific diagnosis.
The couple married for the second time in June 2013 after splitting in 2010 after 13 years of marriage.
Copyright 2018 United Press International, Inc. (UPI). Any reproduction, republication, redistribution and/or modification of any UPI content is expressly prohibited without UPI's prior written consent.