Bale, a five-time Champions League winner with Real Madrid who is Wales' most-capped male player and their record men's goal-scorer, announced his decision on Monday afternoon.
The 33-year-old made his final competitive appearance during Wales' World Cup group stage fixture with England on November 29 and bows out with 111 appearances for his country and 41 goals.
The forward wrote on social media: "After careful and thoughtful consideration, I announce my immediate retirement from club and international football.
"I feel incredibly fortunate to have realised my dream of playing the sport I love.
"It has truly given me some of the best moments of my life. The highest of highs over 17 seasons, that will be impossible to replicate, no matter what the next chapter has in store for me."
Cardiff-born Bale started his career at Southampton and shot to prominence at Tottenham before moving to Real in the summer of 2013 for a then-world record fee of £85.1million.
He was at the Bernabeu for the next nine years and his honours included three LaLiga titles, five Champions Leagues, three UEFA Super Cups and as many Club World Cups.
A statement from the Spanish giants expressed their "affection and love for a great legend" following Bale's announcement.
The Real statement added: "Gareth Bale was part of our team in one of the most successful eras in our history and will represent forever many of the brightest moments of the past decade. His figure will always be linked to the history and legend of our club."
Bale left Real Madrid in the summer to sign for Major League Soccer outfit Los Angeles FC and scored in his final club outing in November to help them win the MLS Cup with a penalty shoot-out success over Philadelphia Union.
It would prove the 17th trophy won by Bale and provided him with momentum ahead of Wales' historic return to the world stage this winter.
Bale scored from the penalty spot in his country's 1-1 draw with USA, but defeats to Iran and England saw Wales bow out in the group stage in Qatar.
"My decision to retire from international football has been by far the hardest of my career," Bale said.
"My journey on the international stage is one that has changed not only my life but who I am. The fortune of being Welsh and being selected to play for and captain Wales, has given me something incomparable to anything else I've experienced.
"So for now I am stepping back, but not away from the team that lives in me and runs through my veins. After all, the dragon on my shirt is all I need."
England captain Harry Kane most recently shared the pitch with former Spurs team-mate Bale when his side met Wales at the World Cup.
The striker quote tweeted Bale's retirement announcement and wrote: "Congrats on an amazing career, it was a pleasure to have played together. All the best with whatever's next!"
A tweet from Spurs read: "Thank you for everything, @GarethBale11. Congratulations on an incredible career."
A further tweet labelled Bale a "genius" and another said "he was born to play for Spurs".
Those sentiments were echoed by Southampton who also referred to him as a "generational talent" and "one of our own".
Former Southampton and Tottenham manager Harry Redknapp, who managed Bale at Spurs, hailed the attacker as an "incredible footballer".
He added on Sky Sports News: "He could just do everything. He could run long distance, sprint at amazing speed, shoot with both feet, head it, dribble and his physique was incredible.
"He was the full package and a smashing guy. He had everything as a player."