Mexico's women overcame challengers Kyrgyzstan in a 5-0 thriller to lift the trophy.
The men's team also put in a powerful performance to see off Brazil 6-1, and keep the silverware.
More than 500 men and women from 52 countries around the world competed in four-a-side matches over several days.
Nearly 100,000 spectators watched the free-to-watch games, which were staged in George Square in the heart of Glasgow.
Organisers said two million people also watched the tournament online.
First Minister Nicola Sturgeon, who attended the event, said the Homeless World Cup would energise and engage people who, for whatever reason, had become socially excluded.
The event was set up by the International Network of Street Papers and Mel Young, founder of the Big Issue in Scotland.
Mr Young said: "We promised that George Square would be the most inspiring place on the planet for the duration of this tournament, that so it has been.
"The people of Glasgow have taken our players to their hearts, and made this such a very special tournament in the history of the Homeless World Cup.
"As our players head back to their countries, we wish them every success as they look to build on this experience, and create a life they would want for themselves.
"Rightly, they should stand tall. We can genuinely say: you are all winners."
Scottish Minister for Sport Aileen Campbell said: "The Homeless World Cup has been a fantastic and exciting tournament that all of Scotland has got behind.
"It's been great to see George Square busy every day and is a perfect example of how the power of sport can both transform lives and change perceptions for the better."
The next Homeless World Cup will be held in Oslo in the summer of 2017.

Paul Wilson, 38, of Helperby, had an allergic reaction to a takeaway from the Indian Garden in Easingwold, North Yorkshire, on 30 January 2014.
Mohammed Khalique Zaman, 52, from York, did not enter a plea at Northallerton Magistrates' Court on Friday.
The case was adjourned to Teesside Crown Court on 8 May.
Mr Zaman spoke only to confirm his name, age and address.
He has been further charged with perverting the course of justice and an employment offence under the Immigration, Asylum and Nationality Act 2006.
North Yorkshire Trading Standards has served summonses on Mr Zaman for six offences under food regulations, the court was told.
Mexico celebrated double success at the 14th Homeless World Cup in Glasgow after both their men's and women's teams retained their titles.
[NEXT_CONCEPT]
A restaurant owner has appeared in court accused of the manslaughter of a customer with a peanut allergy, who died from anaphylactic shock.