The 24-year-old has signed a six-year contract and will cost Real Madrid around 100million euros.
Bale will be presented as a Real Madrid player at the club's Bernabeu Stadium at noon UK time on Monday.
Bale has released a statement in which he said: "I have had six very happy years at Tottenham but it's the right time to say goodbye.
"We've had some special times together over the years and I've loved every minute of it.
"I would like to thank everyone at the Club; the Chairman, Board, staff, coaches and players and, most of all, the fantastic fans, who I hope will understand this amazing career opportunity.
"I am not sure there is ever a good time to leave a club where I felt settled and was playing the best football of my career to date. I know many players talk of their desire to join the club of their boyhood dreams but, I can honestly say, this is my dream come true.
"I am well aware that I would not be at the level I am today were it not for, firstly Southampton, and then Spurs, standing by me during some of the tougher times and affording me the environment and support they have.
"Tottenham will always be in my heart and I'm sure that this season will be a successful one for them. I am now looking forward to the next exciting chapter in my life, playing football for Real Madrid."
Tottenham chairman Daniel Levy said: "Gareth was a player we had absolutely no intention of selling, as we look to build for the future.
"He is a player whose career we have fostered and developed, and he was only a year into his new four-year contract.
"Such has been the attention from Real Madrid and so great is Gareth's desire to join them, that we have taken the view that the player will not be sufficiently committed to our campaign in the current season.
"We have, therefore, with great reluctance, agreed to this sale, and do so in the knowledge that we have an exceptionally strong squad.
"We wish Gareth all the best in the future and he shall always be welcome at(White Hart) Lane."