The Netherlands national coach has been linked with United since the departure of David Moyes towards the end of last season.
Van Gaal will join United after Holland complete their World Cup campaign in Brazil and he has signed a three-year deal.
Giggs, who has also decided to end his playing career after 963 games for the club, will be Van Gaal's primary assistant and he is also bringing coaches Frans Hoek and Marcel Bout with him.
Van Gaal told the club's official website: "It was always a wish for me to work in the Premier League.
"To work as a manager for Manchester United, the biggest club in the world, makes me very proud!
"I have managed in games at Old Trafford before and know what an incredible arena Old Trafford is and how passionate and knowledgeable the fans are.
"This club has big ambitions; I too have big ambitions. Together I'm sure we will make history."
Giggs is looking forward to working under another manager with the experience Van Gaal will bring to the club, having spent so many years as a player under Sir Alex Ferguson.
He said: "I am thrilled to have the chance to serve as assistant manager. Louis van Gaal is a world-class coach and I know I will learn a lot about coaching from being able to observe and contribute at such close quarters.
"Manchester United has been a huge part of my life and I'm delighted to be able to continue that relationship in such a key role."
Chief executive Ed Woodward added: "In Louis van Gaal, we have secured the services of one of the outstanding managers in the game today.
"He has achieved many things in his career to date and Old Trafford provides him with a fitting stage on which to write new chapters in the Manchester United story.
"Everyone is very excited about this new phase in the club's history. His track record of success in winning leagues and cups across Europe throughout his career makes him the perfect choice for us.
"People know him as a larger than life character but I have also been extremely impressed by his intelligence, thoughtful approach to the role and his diligence. I'm looking forward to working with him."
On Giggs, Woodward added: "I'm delighted that Louis has chosen Ryan as his assistant. Ryan's association with the club spans over two decades and his knowledge and stature will be of great use to Louis.
"In addition, this is a fantastic opportunity for Ryan to learn his trade alongside a world-class manager whose attacking instincts and belief in youth are tailor-made for Manchester United."
And Joel Glazer of the club's owners, the Glazer family, said: "I am delighted that Louis will be our next manager.
"He has an outstanding pedigree as a coach, both as a man who motivates his teams to win trophies and as someone who believes in giving young players a chance to prove their worth.
"I am sure he will make a big impression on the club, the players and the fans."