The 29-year-old will compete with Juanfran for the right-back spot following the departure of Javier Manquillo to Liverpool.
Gamez has penned a three-year deal and will join a much-changed squad from that which claimed La Liga title last season.
Top-scorer Diego Costa and full-back Filipe Luis have left for Chelsea, who have also reclaimed on-loan goalkeeper Thibaut Courtois, while forward Adrian has joined Porto.
Coming in are France winger Antoine Griezmann, Croatia striker Mario Mandzukic and Brazilian left-back Guilherme Siqueira.
Gamez came through the youth ranks at Malaga before breaking into the first team in 2005.
Atletico sporting director Jose Luis Perez Caminero was pleased to have him on board, telling the club’s official website, www.clubatleticodemadrid.com: “Gamez is a full-back with quality and experience who will reinforce our defence and increase the group’s internal competitiveness.
“He can also play in a central position, allowing us to have other variables in the defensive game. His experience will be helpful to the group.”