Robben played in three World Cups for the Netherlands - 2006, 2010 and 2014 - and is tied for most global goals in his country's history.
The hosts needed to pip the Swedes on goal difference to have any chance of reaching the World Cup, by winning by seven goals.
They have now missed out on a second major tournament after also failing in their bid to qualify for last year's European Championship in France.
Tuesday's performance was vintage Robben. We all know the ego of Dutchman Arjen Robben, but how about this.
He is joint fourth on the Netherlands' all-time goalscorer list, level with former Arsenal forward Dennis Bergkamp.
Robben then doubled the advantage five minutes from the break with a spectacular first-time effort from the edge of the box, but Sweden held firm in the second half to move on.
However, Dick Advocaat's side had needed to score seven times, leaving the third-placed team at the previous World Cup absent from the party at Russian Federation 2018.
After the final whistle, Robben completed a slow lap of honour with his two young sons, one of them netting a couple of goals with his left foot to roars from the crowd.
After struggling to hold down a regular place under Jose Mourinho since joining from Benfica this summer, Lindelof started in Sweden's final World Cup group qualifier but the 23-year-old got off to a woeful start by conceding a penalty after just 16 minutes.
Robben ended his global career with 37 goals from 112 appearances.