The Spanish giants released a statement on their official website on Sunday evening which read: "Real Madrid and Tottenham Hotspur have reached an agreement for the transfer of Gareth Bale, who will be contracted to the club for the next six seasons.''
The news came shortly after Spurs had confirmed they had reached an agreement with Real over the sale of the Welshman.
The deal is subject to Bale passing a medical with the nine-time European champions, with all other details resolved.
Real say the 24-year-old will be presented as their new player at the Bernabeu on Monday at 1200 BST.
Although the fee has not been revealed, reports suggest it will be around £85million, eclipsing the £80million Real paid to Manchester United for Cristiano Ronaldo in 2009.
In a statement posted of Tottenham's official website, Bale 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."
Spurs have added a host of players to their squad during the summer transfer window, which closes on Monday, so appear in good shape to cope without Bale.
They include Roberto Soldado, Christian Eriksen, Erik Lamela and Paulinho.
Spurs chairman Daniel Levy highlighted that point.
He 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 to which we have added no fewer than seven top internationals. More importantly, we have an immense team spirit and a dressing room that is hungry for success.
"We wish Gareth all the best in the future and he shall always be welcome at the Lane."
Bale made his league debut as a 16-year-old for Southampton in 2006 before joining Tottenham the following year.
He was twice crowned PFA player of the year during his time at Spurs, including last season when he scored a series of spectacular goals.
Spurs manager Andre Villas-Boas, speaking after his side's 1-0 defeat at Arsenal on Sunday, said: "We wish him all the best.
"The player is an absolutely wonderful player.
"He has left us with some great memories from last season which every Tottenham fan cherishes, but he has moved on and we will move on as well.''
Gareth Bale factfile
1989: Born July 16 in Cardiff.
2005: Joins Southampton as a trainee.
2006: April 17 - Aged 16 years and 275 days, becomes second youngest footballer to play for Southampton in 2-0 Championship win against Millwall.
May - Makes Wales Under-21 debut against Cyprus. Quickly promoted to the senior squad for a friendly against Trinidad and Tobago, coming off the bench to become Wales' youngest full international at 16 years and 315 days.
July 16 - Signs first professional contract with Southampton on his 17th birthday.
August 6 - Scores first goal for Saints with free-kick on opening day of the season in a 2-2 draw at Derby.
September 5 - Makes first start for Wales in 2-0 defeat to Brazil.
October 7 - Becomes Wales' youngest goalscorer with a trademark free-kick in a 5-1 defeat to Slovakia.
2007: January - Bale's agent says he is happy to stay at Southampton despite Manchester United and Tottenham reportedly bidding £10million for the player. Both clubs admit their interest.
May 25 - Joins Tottenham.
August 26 - Makes his first-team debut for Tottenham in a 1-0 defeat at Manchester United.
September 1 - Scores first Tottenham goal in away draw at Fulham.
September 15 - Scores in his first north London derby against Arsenal.
December 2 - Injury against Birmingham rules him out for the rest of the season.
2009: June - Undergoes knee surgery, ruling him out for the start of the 2009-10 Premier League campaign.
September 26 - Bale tastes victory as a Premier League player for the first time in 25 attempts in the 5-0 defeat of Burnley.
2010: January 26 - Secures first victory as a Premier League starter at the 23rd time of asking.
April - Scores in successive games against Arsenal and Chelsea to help Tottenham finish in the Premier League's top four. Named player of the month.
May - Signs new four-year deal for Tottenham.
August 25 - Sets up all four goals as Tottenham beat Young Boys 4-0 in the second leg of their Champions League qualifying game to progress to the group stages.
October 20 - Scores a scintillating hat-trick against Inter Milan at the San Siro. Named Welsh player of the year by the FAW.
November 2 - Produces man-of-the-match display as Tottenham beat Inter 3-1.
2011: January 28 - Tottenham manager Harry Redknapp rules out possibility of selling Bale, amid interest from Inter.
March 19 - Bale signs new four-and-a-half-year deal with Spurs.
April 17 - Named Professional Footballers' Association Player of the Year.
2012: January - Named in the UEFA team of the year. Also named as Premier League player of the month for the second time.
June 27 - Signs new four-year contract with Spurs.
June 30 - Suffers a recurrence of an old back and hip injury after pulling up while running, ending his hopes of competing in the Olympics.
September 11 - Scores the first of his 29 goals so far this season - a stunning free-kick for Wales against Serbia.
October 20 - Pulls out of Tottenham's game against Chelsea just before kick-off so he can attend the birth of his first child, Alba Violet Bale.
2013: February 7 - Manager Andre Villas-Boas admits Tottenham are likely to lose Bale in the summer unless they qualify for the Champions League.
February 25 - Scores a contender for goal of the season at West Ham - a stoppage-time winner from 30 yards.
April 27 - Villas-Boas says he has been told by Tottenham that Bale will stay if Spurs finish in the top four.
April 28 - Becomes only the third player to be voted senior and young Player of the Year at the PFA Awards.
May 2 - Wins the Football Writers' Association Footballer of the Year award for the first time.
July 28 - Reports emerge of a world-record bid of 100m euros for Bale from Real Madrid, with the player said to be unhappy at chairman Daniel Levy's refusal to consider it.
August - After weeks of speculation, it emerges that Tottenham technical director Franco Baldini had flown to Madrid for negotiations over a potential deal.
August 26 - It emerges Tottenham have received bids for Bale from more than one club.
August 28 - After Bale misses two days training, Villas-Boas says the club will consider fining him while admitting the player is on the brink of a move to Madrid.
September 1 - Real Madrid announce the signing of Bale for a world-record fee understood to be 100m euros (£85.3m) on a six-year deal.