Gomez is Man City's fourth summer signing following the arrivals of Kalvin Phillips, Erling Haaland and Stefan Ortega.
The Premier League champions have paid £11m for Gomez's services.
Pep Guardiola's side were on the market for a left back after selling Oleksandr Zinchenko to Arsenal, leaving Joao Cancelo as their only option for the role, with Bernard Mendy still battling legal issues.
They were linked with Marc Cucurella, who joined Chelsea instead from Brighton and Hove Albion.
Gomez played under former Manchester City captain Vincent Kompany at Anderlecht last season, making 49 appearances with seven goals and 12 assists across all competitions.
"I am incredibly proud and happy to have joined Manchester City," Gomez said after completing his move.
"City are the best team in England and in Pep Guardiola I have a chance to learn and develop under the most outstanding manager in world football.
"To be able to be part of this club is a dream come true for me and something any young player would aspire to.
"The number of trophies City have won over the past few years has been incredible and the style of football the team plays under Pep is the most exciting in Europe.
"Playing for and being guided by Pep and his coaches is going to be very special.
"I've heard so much about the City fans and how passionate they are, so I can't wait to get started and to try and help the club achieve even more."
City director of football Txiki Begiristain added: "We are delighted to be able to welcome Sergio to Manchester City. He is a very exciting young talent.
"Sergio's development in recent seasons has been very impressive - he is an accomplished defender with great potential.
"Over the past year, he has gained excellent experience playing in the Belgian League and in Europe with Anderlecht.
"We're sure that he will bring additional quality to our squad both in defence and going forward and that he will only continue to develop and improve playing under Pep and his coaches."