The star had posted a video of herself and husband Josh Kelley at a hospital several days ago, but hadn't revealed that she needed surgery.
A herniated disc, sometimes referred to as a slipped disc, is when a soft cushion of tissue in the spine is pushed out of place. The condition can be extremely painful if pressed against nerves.
In a post-recovery snapshot, Katherine was sitting up in bed, with her head in a neck brace, while wearing a comfortable knitted pyjama set.
WATCH: Katherine Heigl's husband keeps her entertained during hospital visit
Finding some humour in the situation, Katherine wrote: "Well…I am now bionic!! Two titanium disk now inhabit my neck and I can probably stand on my head for like hours…I'm not gonna try it just yet but give me a few months and I'll blow your mind!!"
Getting more serious the former Grey's Anatomy star said: "I am so deeply deeply grateful to the incredible Dr's and care team that saved me from the most excruciating pain I have ever experienced and blessed me with a new pain free lease on life!"
Katherine went on to praise the doctors and other staff that looked after her during her surgery and recovery and for the "tremendous talent and expertise" they displayed in their care.
She added: "Heading into surgery and hospital stays is always a bit scary and you guys could not have made me feel more comfortable or taken care of! Thank you, thank you, thank you."
Finishing her post with a joke, Katherine jested: "Oh and happy ST. PATRICK'S DAY! Clearly I've been blessed with the luck of the Irish today!"
The star is now recovering from surgery
Many of Katherine's fans were supportive of the actress, with many drawing comparisons to her character of Dr. Izzie Stevens on Grey's Anatomy.
"Dr. Izzie Stevens can help you!!!" wrote one, while another posted about a different character: "Did Dr. Meredith Grey do your surgery?"
But many fans passed on their well wishes for the actress, and one said: "So glad you are feeling better already. You even make a neck brace look glam my friend. I love your doctors and care team so much! Rest up!"
"Speedy recovery Katherine," posted another fan, alongside a flexing arm emoji.
Katherine was suffering from a herniated disc
Katherine is the doting mother to three children, who will no doubt look after her during her recovery, but the actress made a surprising revelation about a possible baby number four.
The Firefly Lane star was planning on introducing a fourth child to her family, which consists of two adopted daughters and one biological son, but this changed as the COVID-19 pandemic struck.
Katherine revealed to Parents magazine that while she and Josh, thought "that we needed one more child to complete this home," they completely changed their minds during the pandemic.
"I am very content with my three!" Katherine said.
Read more HELLO! US stories here
Like this story? Sign up to our newsletter to get other stories like this delivered straight to your inbox.