The Slovaks won their only other medal, a bronze, in 1998-'99, in Winnipeg. Eighth last year, they leave this tournament with wins over Finland, the Czech Republic, Germany and Sweden, losing only to Canada (twice) and the U.S.
Sweden pulled its goalie with 2:28 remaining, only to see Reway set up Patrik Koys for an empty-net insurance goal at 19:04.
Slovak goalie Denis Godla, one of the stars of the tournament, raised his arms in triumph as the final buzzer went before he was mobbed by his teammates.
The Swedes fought back after digging themselves an early 2-0 hole but their finishing — and some loose defence — failed them.
With the game tied 2-2, the hard-working Slovaks started the third on a five-minute power-play after Julius Bergman received a five-minute penalty for interference and a game misconduct for felling Koys at the end of the second. Koys needed help to get off the ice after being seemingly high-sticked in the neck but returned in the third.
Pavol Skalicky took advantage, beating goalie Linus Soderstrom between the legs from the slot after a perfect pass from Reway, a Montreal Canadiens' prospect, at 2:52.
David Soltes and Mislav Rosandic also scored for Slovakia, which got another stellar performance from Godla.
William Nylander and Jens Looke scored for Sweden. Both teams had 28 shots on goal.
While there were empty seats, the game drew an enthusiastic crowd — most clad in red Canadian jerseys ahead of the gold-medal showdown — that cheered on Nylander every time the Toronto Maple Leaf prospect's name was announced. The stylish forward had a goal and six shots in the first alone.
Down 2-0 after four minutes, the Swedes rallied to open holes in the Slovak defence and went into the first intermission tied 2-2. But Slovakia did not back down in a scoreless second that saw the Swedes' finishing unable to match their often slick buildup.
Sweden led Group B with a 4-0-0-0 record and beat Finland 4-0 in the quarter-finals before losing 4-1 to Russia in the semifinal.
The Swedes took silver the last two years after winning the 2011-'12 tournament in Calgary. They came into the game with 17 tournament medals (2-10-5)
Slovakia (2-0-0-2) finished third in Group A, recovering from an 8-0 loss to Canada on the opening day of the tournament. The Slovaks went on to win three of their next four, including a 3-0 quarter-final victory over the favoured Czechs, before falling 5-1 to Canada.
Godla, given the hook against Canada on Boxing Day, came into the game with a 2.90 goals-against average and .925 save percentage. Godla, eligible for the 2015 NHL draft, led all tournament goalies in shots faced (214) and saves (198) going into the final day of play.
Soderstrom, a New York Islanders prospect, had a 2.19 GAA and .9221 save percentage.
Soltes opened the scoring at 2:43 after a clearing pass by Andreas Englund deflected to him in the slot and the Slovak beat Soderstrom with a low shot to the stick side.
Rosandic made it 2-0 just 39 seconds later. Reway found him alone on a rush and the Rosandic burst it on net, neatly deking Soderstrom before poking it in.
Outshot 5-0 and trailing 2-0, the Swedes called a timeout.
The smooth-skating Swedes began to get their act together and Nylander scored his third goal of the tournament from in close at 10:22 after a nifty tic-tac-toe passing play.
Sweden had a five-on-three power play for 85 seconds but couldn't beat Godla. After the Swedes hit the post with a shot from the blue-line, Looke tied it at 2-2 at 16:12 after a sweet pass from Christoffer Ehn found him all alone cruising towards the goal.
Once trailing the shot count 7-2, Sweden finished the first with a 15-10 edge.
The start of the second almost mirrored the first with a Swedish giveaway giving Reway a glorious chance, but Soderstrom stuck out a leg to deny him.
A Slovak power-play goal was negated by a Rosandic penalty midway through the second as Slovakia outshoot the Swedes 13-6.
Follow @NeilMDavidson on TwitterSuggest a correction