The 2006 Olympic champions will face the United States or Canada on Sunday.
The Finns will play the loser of the second semifinal for bronze on Saturday.
All the scoring came in the second period, with Finland going ahead 1-0 on Olli Jokinen's goal from a sharp angle to the left of Lundqvist.
Sweden's Loui Eriksson tied the game by finishing off a sweet sequence of passes midway through the period. Karlsson made it 2-1 with a slap shot from the middle of the ice just inside the blue line with 3:34 left.