Bailly has only made 100 United appearances in close to five seasons, largely because of injuries.
However, his new deal will see him continue to add to competition for places in defence next season.
“This decision is something I didn’t have to think about, I love this club and I love playing for Manchester United,” Bailly told the club’s official website.
“I’m happy and so are my family, everything is good. Now the moment with my injury has passed and I’m fit and feel good, and that’s it. A new contract is like a new challenge and I’m ready for this.”
Bailly has so far won the Carabao Cup and Europa League as a United player, both of which came in his first season at Old Trafford.