The 61-year-old guided the Robins to the National League title in 2015-16, his first full campaign in charge.
But they only avoided an instant drop back into non-league on the penultimate weekend of this season.
"We've had a couple of good chats and I'm happy with the way things are going," former Yeovil boss Johnson told BBC Radio Gloucestershire.
Johnson, who celebrates 25 years in management in October, says he has now fully recuperated after heart surgery in March, which saw him miss several of Cheltenham's matches.
And he admitted any further health problems could have scuppered the new deal.
"I'd already sat down and agreed with the chairman but of course we had to wait until I was better," he said. "I'm certainly ready now."
Johnson began his managerial career at Cambridge and has also taken charge of Bristol City, Peterborough and Northampton, with a 14-game spell in charge of Latvia between 1999 and 2001.
Cheltenham Town manager Gary Johnson has signed a new two-year contract with the League Two club.