A brace from Troy Parrott and Conor Masterson's header secured the comeback after Mattias Svanberg's opener.
Ireland dominated the contest from start to finish and could have gone ahead just two minutes in after Aaron Connolly turned in from the right but saw his shot go wide of the left-hand post.
Svanberg put Sweden ahead with a brilliant 20-yard strike in the 18th minute but Ireland continued to create chances as both Dara O'Shea and Darragh Leahy saw their headers saved in quick succession in the 24th minute.
Just before the half-hour, Waterford FC's Zack Elbouzedi produced a brilliant run down the right to cross for Connolly but he saw his shot saved before he deflected Waterford's Jayson Molumby's shot straight at the keeper.
Stephen Kenny's side continued to dominate in the second-half as Leahy's cross was put into the net by Jonathan Afolabi but the referee adjudged the striker to have handled it into the net with just over 30 minutes remaining.
Four minutes later, Connolly was fouled in the area and was awarded a penalty. The Brighton and Hove Albion striker stepped up but Pontus Dahlberg produced an incredible save to his right to deny him.
Ireland finally got the goal their play deserved in the 69th minute. Afolabi's low cross was cut out but the clearance went straight to the substitute Parrott who fired into the roof of the net to level the tie.
Ireland continued to pour forward and deservedly went ahead with three minutes of normal time remaining. JasonMolumby's corner found Masterson and his header arrowed into the right-hand corner of the net to put Stephen Kenny's side ahead.
The memorable night got even better as in stoppage time, Jason Molumby's fantastic pass found Parrott who turned inside the defender to chip the keeper and secure the points for Ireland, and three wins from the three opening qualifying games.
"I can only praise the courage of the players, to keep going the way they did and keep creating chances, it was fantastic," said U-21 boss Stephen Kenny.
"You can only have so many set-backs in a game, Sweden scored a fantastic goal and then we missed a number of chances, including the penalty which was brilliantly saved.
"It is a great sign that the players continued to create chances throughout the match and we can be incredibly proud of the result. We've done really well in the group so far but we've got two tough matches against Italy and Iceland coming up next month, and we're looking forward to it."
Sweden: Dahlberg (GK), Beijmo, Hadzikadunic, Andersson, Ingelsson (Hussein 81), Hansson (J Larsson 62), Svanberg (C), Kulusekvski, Kimpioka (Gyokeres 67), Isherwood (Cajuste 62), Irandust (Froling 80).
Republic of Ireland: Kelleher (GK), O'Connor, Leahy, Masterson, O'Shea, Coventry, Elbouzedi (Kilkenny 72), Molumby (C), Connolly, Mandroiu (Parrott 51), Afolabi (Idah 82).
Referee: Rade Obrenovic (SVN)
Attendance: 4078