Elanga's impressive left-footed strike from just outside the right corner of the box in the 62nd minute was his second goal of this year's tournament.
The former Manchester United striker Elanga has scored only three goals in 49 games for Newcastle, but zero in 32 Premier League matches.
Six minutes earlier, Maeda settled a nifty pass from Ritsu Doan with his left foot in the penalty area and easily beat Jacob Widell Zetterstrom.
It was Japan's seventh goal of the tournament, the country's most for an entire World Cup. That topped the six the Japanese scored while reaching the round of 16 in Russia eight years ago.
Japan are advancing out of the group stage for the third consecutive World Cup and fifth time in seven tries since first reaching the round of 16 as co-hosts in 2002.
The Japanese team finished second in Group F behind the Netherlands and will play Brazil in Houston on Monday.
The Swedes have advanced to the knockout round the past four times they've qualified for the World Cup going back to 1994, when they reached the semifinals the last time the US hosted soccer's biggest event.
Elanga had another chance in injury time, with his right-footed attempt forcing goalkeeper Zion Suzuki to make a diving deflection.
On the ensuing corner kick, Suzuki deflected Alexander Isak's header into the air and eventually ended the scoring chance with a leaping grab among a crowd of players.