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.
Bristol City head coach Lee Johnson has signed a new contract to stay with the Championship club until 2020.