Having both been unseeded for the draw in Zürich, the pair could have faced Italy or Croatia but instead the Republic face Denmark - away first - while Northern Ireland were paired with Switzerland, the first meeting at home.
The first legs will take place between 9 and 11 November and the return legs between 12 and 14 November, with the away goals rules in effect.
Switzerland were actually the highest-ranked team in the draw, sitting 11th in FIFA's world rankings, and were marked as the best second-placed team from the group stages.
They won seven of the eight matches that qualified - with games against every group's bottom-placed team being discounted - to claim 21 points, with Italy next best on 17. Only goal difference denied the Swiss first place, with Portugal's superior goals for and against columns booking their place in Russia.
But as Northern Ireland look to follow up their Euro 2016 success by qualifying for their first World Cup finals since 1986, they will undoubtedly carry confidence of a result - particularly if they can earn a positive first-leg result at Windsor Park.
In reaction to the draw, Northern Ireland manager Michael O'Neill said: "We knew it was going to be difficult. They've had a good campaign, but we have a big opportunity to get to Russia.
"We know we'll have to be at our best but we believe we're good enough to do that. The most important thing is we don't concede an away goal. We'll be prepared for Belfast. We've only lost one game there in four years."
The Republic - managed by Martin O'Neill - have not reached a World Cup proper since South Korea in 2002, when they qualified via the play-off route with a two-legged win over Iran in an inter-confederational clash.
They have failed to qualified for all of the last three finals, however, and lost out in the play-offs in 1998 and 2010 - the latter famous for a controversial Thierry Henry handball in the build-up to France's extra-time winning goal.
They face a Denmark team that won five of their final six qualifiers to claim the third-best record of the nine runners-up, finishing second to Poland in Group E.
Republic manager O'Neill said of the draw: "Naturally, we're just pleased to be in the draw. Being unseeded means it was always going to be a difficult tie.
"I know the Denmark manager, we used to play together. It will be an interesting confrontation.
"We have momentum and that's important. We won last two games to get here. I'm now concerned with the next couple of weeks and making sure my players don't get injuries at club level."
Elsewhere, Sweden against Italy provides the most eye-catching clash for the neutral while Croatia are favourites to beat Greece in the fourth and final tie.
European World Cup play-off draw in full:
Northern Ireland vs Switzerland
Croatia vs Greece
Denmark vs Republic of Ireland
Sweden vs Italy