Halfpenny was out for three months after suffering a head injury during a Test victory over Australia in November.
The British and Irish Lion thought he may have to retire due to the damage suffered against the Wallabies.
"If I'm being honest it did," the 30-year-old said when asked if it had crossed his mind that he may have to quit.
"There was a point where I was constantly having headaches and was trying to do something on the bike or jogging and my head would be pounding from it."
He said: "You were thinking, 'when is this going to end?' It was a tough one. I'm delighted to be over it."
Halfpenny knows he faces a battle to earn a Wales recall after Warren Gatland's side completed a Six Nations Grand Slam.
"The back three in the Six Nations were absolutely outstanding and there's a lot of competition for places in the back three," Halfpenny said.
"It's about putting in the hard work."