Manchester United, beaten by Barca in May's final, were first of the 32 teams out of the hat and drawn with Benfica, the team they beat in the final to win their first European Cup in 1968, Basel and Romanian debutants Otelul Galati.
Benfica's name was drawn out by United great Bobby Charlton, who scored against Benfica in the 1968 final.
"We have a long friendship with Benfica and Eusebio and Sir Bobby are great friends," United chief executive David Gill said.
"We have played Benfica in the Champions League recently and lost to them but it is always special when they come to Old Trafford."
Gill's club travel to the Stadium of Light in Lisbon for the opening match on September 14 with the return in Manchester on November 22.
Manchester City, the world's richest club thanks to owner Sheikh Mansour of Abu Dhabi and playing in the Champions League for the first time, were drawn with four-times European Cup winners Bayern Munich, Villarreal and Napoli.
New boy Sergio Aguero, City's record 38 million pounds signing, faces a trip to Napoli, the former club of father-in-law Diego Maradona.
"This is the toughest group of the whole draw," Bayern coach Jupp Heynckes told his club's website (www.fcbayern.t-home.de). "I know Villarreal and Napoli and they are absolute top teams.
"As for Manchester City ... they have boosted their squad and are desperate for European success. We will be challenged in every single game and have to be fully focussed."
City official Brian Marwood said: "Any two of the four can go through and it's going to be tough. But our coach (Roberto Mancini) will know all about Napoli from his days in Italy."
The first game back for City in Europe's elite competition since their only previous appearance in 1968-69 will be at home to Napoli on September 14.
Villarreal's Italian striker Giuseppe Rossi, who knows Manchester well from his days at Old Trafford, said on Twitter: "What a group! It's Champions League, no Mickey Mouse tournament -- excited."Arsenal survive to reach Champions League
Real Madrid, European champions a record nine times, face perennial opponents Olympique Lyon along with Ajax Amsterdam and Dinamo Zagreb, back in the competition after a 12-year absence.
Trabzonspor, brought in Thursday after the Turkish FA withdrew Fenerbahce because of match-fixing allegations, will play in the same group as 2010 champions Inter Milan, CSKA Moscow and Lille.
Among the top-seeded teams Chelsea face Bayer Leverkusen, Valencia and Genk.
The London club will welcome back former midfielder Michael Ballack when Leverkusen visit Stamford Bridge in their opener on September 13, while new Chelsea signing Juan Mata will come face to face with his old club Valencia later that month.
Belgian club Genk are back in the competition for the first time in almost a decade.
"It's fantastic for us to be back in the Champions League and we are going to enjoy it no matter what happens," Genk director Dirk Degraen told Reuters.
"It is not just about the money -- it is simply the best competition there is."
The group stage starts on September 13-14, with the final set for Munich on May 19.