Johnson helped the Robins avoid relegation last season after joining them from Barnsley in February.
The 35-year-old, who played 199 games for City between 2006 and 2012, started his managerial career with Oldham in 2013, before moving to Oakwell in 2015.
His previous contract at Ashton Gate was set to end at the end of the 2018-19 season.
"Like I said when I was appointed, Bristol City is the perfect club for me," he told the club website.
"We want to deliver success; everything about the club is progressive and that's why I'm desperate to be a part of that in the long term."
Bristol City have won just one of their past six games in all competitions, but they are 11th in the Championship table, just four points outside the play-off places.

It found the problem was compounded by the force's outdated and disjointed IT systems, one of which was at least 25 years old.
But it also praised the "high quality training" offered by the force.
The review was launched in response to a complaint of racial discrimination made by PC Jim Davies in 2014.
It also recorded another allegation of "racist language" used by an officer in the same year, which was reduced from gross misconduct to misconduct.
And it raised concerns over "potentially derogatory" Powerpoint slides used in training, which referred to "good breeding potential" and women who "expect to be hit".
The authors of the review highlighted the absence of an "ethnicity recording system" that could properly track people from the Gypsy, Roma and traveller (GRT) communities.
They said this problem was made worse by "elderly" IT programs, including a DOS-based system at least 25 years old, and a version of Windows that Microsoft no longer supported.
It said: "Without clear ways of tracking GRT populations it is impossible to effectively consider the equality impact on these populations."
The review was carried out between June 2014 and May 2015 and was led by Professor Margaret Greenfields of Buckinghamshire New University, as well as PC Davies who founded the the Gypsy, Roma and Traveller Police Association.
Prof Greenfields said the force had "fully accepted" the review's recommendations and praised it for "seeking to go far beyond tokenism or minimum standards of community engagement".
A total of 40 crimes were identified in which members of the GRT community were involved.

Chris King, 57, of Doncaster, lost both hands, except his thumbs, in an accident at work four years ago.
He had the complex operation at Leeds General Infirmary in July.
The Leeds Rhinos fan is also looking forward to being able to clap when he goes to watch the rugby league team.
Live updates and more stories from South Yorkshire
Mr King can now do a range of tasks, including writing, making a cup of tea and gardening, and has progressed faster than his surgeon anticipated.
He next hopes to tie his own shoelaces and button up his shirt.
"It's been going fantastically," he said.
"I can make a fist, I can hold a pen, I can do more or less the same functions as I could with my original hands."
Mr King's accident involved a metal pressing machine and left him close to death.
A team of "unsung heroes" at Sheffield's Northern General Hospital saved his life and enabled the later transplant surgery, he said.
Professor Simon Kay, a consultant plastic surgeon, performed Mr King's double transplant.
The hospital is hoping the procedure could one day be as routine as a kidney transplant.
Mr King said he wanted to again thank the family of the person who donated the hands.
He also encouraged others to become donors and provide "this wonderful gift".
Bristol City head coach Lee Johnson has signed a new contract to stay with the Championship club until 2020.
[NEXT_CONCEPT]
Thames Valley Police must improve how it records data on Gypsies, Roma and travellers "as a matter of urgency", an independent review has said.
[NEXT_CONCEPT]
The first person in the UK to have a double hand transplant has written a letter of thanks to his surgeon, nine months after his pioneering operation.