Rob Page's side made it four points from two games in Euro 2024 qualifying after Kieffer Moore scored in a 1-0 victory over Latvia at Cardiff City Stadium.
Wales fans were met by a familiar face prior to kick-off as Bale, who announced his retirement from professional football in January, spoke to the crowd to say his final farewell.
"I just want to say what an honour it has been to represent this country and play in front of the best fans in the world," he said.
"You've supported me and my family through the lowest of the lows and the highest of highs. I can't thank you enough."
Bale has been central to Wales' successes on the international stage, leading his country to their first European Championships in 2016, in which they reached an unlikely semi-final before defeat to Portugal.
The former Real Madrid winger scored in all three group-stage matches at that tournament, before Wales and Bale returned to the same competition five years later and progressed to the last 16 at Euro 2020.
A first World Cup appearance in 64 years followed for Wales as they made it to Qatar, with Bale scoring their first goal at the tournament in a 1-1 draw with the United States.
That campaign ultimately ended in an early exit and disappointment, but Bale urged Wales fans to get behind their side as he moves from the pitch to the stands to become a supporter.
"It's been the biggest pleasure playing in front of you for my whole career," he added. "Obviously I'm going to miss playing in front of you, but make sure you support the boys.
"You, the fans, are Welsh football, you make it so special, you make it what it is. I'll be cheering on like you lot, and hopefully I'll see you soon in the future. Thank you."