The deal will bring together the web's largest search engine and its most popular site to watch video. It is expected to be completed by the end of the year.
Chad Hurley, YouTube chief executive and co-founder, said: "By joining forces with Google, we can benefit from its global reach and technology leadership to deliver a more comprehensive entertainment experience for our users and to create new opportunities for our partners."
Google said that YouTube would continue to operate as a separate company and retain all employees. The acquisition is scheduled to be completed by year's end.
Eric Schmidt, Google chief executive, said: "The YouTube team has built an exciting and powerful media platform that complements Google's mission to organise the world's information and make it universally accessible and useful."
The deal could spell the end for Google's own video-sharing site, Google Video, which has not been as successful as YouTube.
YouTube received 46% of all visits to online video websites in September, compared with 11% for Google, according to Hitwise.
YouTube had 58,000 users in August last year but is now visited by around 12m a month, according to ComScore MediaMetrix.
Other companies that were reported to have been in talks to buy YouTube are Viacom and News Corporation, which already owns the social networking site MySpace.
Warner Bros has recently done a deal with YouTube to make videos and other content available legally and other record companies, including EMI, are in talks to do similar deals.
The sites encourage users to upload their own content, such as video blogs, as well as sharing clips they have taken from other sources.
If you have an opinion on this or any other issue raised on Brand Republic, join the debate in the Forum.