Arsenal face a daunting task after being drawn alongside last season's runners-up as well as Rafael Benitez's Napoli and Marseille.
The Gunners, who qualified after completing a comprehensive play-off win over Fenerbahce this week, were placed in the tough-looking Group F at UEFA's draw in Monaco.
Celtic, who famously beat Barcelona last season, will face the Catalan giants again along with two other former winners in Group H in AC Milan and Ajax.
Manchester City will again play reigning champions Bayern Munich - who they faced two years ago - CSKA Moscow and Viktoria Plzen in Group D.
Chelsea face two of the sides they conquered en route to last year's Europa League success in Basle and Steaua Bucharest, as well as Schalke, in Group E.
David Moyes' Champions League bow with Manchester United will come against Shakhtar Donetsk, Bayer Leverkusen and Real Sociedad in Group A.
Arsenal, who have reached this stage of the competition for 16 successive seasons, also played Dortmund in their group two years ago.
On that occasion Dortmund finished bottom of the section but the Germans are now a much tougher proposition and impressed throughout their run to the final last year.
Napoli, where Benitez took charge after leaving Chelsea last summer, were the side in pot four most clubs wanted to avoid.
Scottish champions Celtic clinched their place in the draw after a dramatic play-off comeback against Shakhter Karagandy.
Neil Lennon's side memorably beat Barca at Parkhead in last season's group stage last November with a dramatic late goal from Tony Watt.
Milan and Ajax add further glamour to the group. The four clubs between them have won 16 European titles.
Manager Neil Lennon told Sky Sports News: "I think it is the best and the worst draw we could have got.
"In terms of glamour I don't think it comes any better than Barcelona, Ajax and AC Milan.
"In terms of football it is probably the most difficult group we could have got.
"But I think the hard work was really done last night and we can go and enjoy the tournament now."
After tough draws and disappointing group stage exits in each of the last two seasons, City had feared another hard set of fixtures.
But although they must take on Munich again, they may be relieved to be facing two of the continent's lesser lights in CSKA and Czech side Viktoria Plzen.
New manager Manuel Pellegrini has taken both Villarreal and Malaga to the latter stages of the competition and there would be disappointment if City failed to reach the knockout rounds again.
City captain Vincent Kompany tweeted: "Interesting draw. Big year for us."
For United and Chelsea, the tasks look reasonably straightforward. Moyes will be expected to guide a side that has reached the final three times since 2008 through the likes of Donetsk, Leverkusen and Sociedad.
Jose Mourinho's Chelsea, the 2012 winners and current holders of the Europa League, will be favourites to top Group E.
Barcelona forward Lionel Messi said he is looking forward to returning to Celtic.
Messi, who scored Barca's goal in the 2-1 loss in Glasgow, said: "It looks an even group and there are some very nice games.
"You don't get any easy groups in the Champions League. We played Celtic last season and know AC Milan very well and Ajax have a great history.
"It's a beautiful group and I'm looking forward to some great games in the competition."
Celtic winger James Forrest, scorer of the injury-time clincher against Shakhter Karagandy, said: "It could have been easier - three big teams so we know it is going to be difficult.
"The teams are really strong in their leagues so they will definitely be tough games, and Barcelona and Milan will be favourites."
Group A: Manchester United, Shakhtar Donetsk, Bayer Leverkusen, Real Sociedad
Group B: Real Madrid, Juventus, Galatasaray, FC Copenhagen
Group C: Benfica, Paris St Germain, Olympiakos, Anderlecht
Group D: Bayern Munich, CSKA Moscow, Manchester City, Viktoria Plzen
Group E: Chelsea, Schalke, Basel, Steaua Bucharest
Group F: Arsenal, Marseille, Borussia Dortmund, Napoli
Group G: Porto, Atletico Madrid, Zenit St Petersburg, Austria Vienna
Group H: Barcelona, AC Milan, Ajax, Celtic