The home side opened the scoring from the penalty spot and doubled their advantage early in the second half.
But O'Rourke pulled a goal back on 70 minutes before substitute Owen Beck made it 2-2 following a superb team move.
Then, with time almost up, U18s skipper O'Rourke was there to net a dramatic decider in the opening group game for the young Reds.
Reflecting on the win, U18s boss Barry Lewtas told Liverpoolfc.com: "We played really well and the boys deserve so much credit.
"We love a late winner and it's no coincidence, as we have said many times.
"Even when we were 1-0 and 2-0 down we were the better team, we played some great football and created lots of chances.
"To be fair to Swansea City, they were dangerous on the counter-attack, but we kept in there and got it back to 2-2.
"Even when we equalised the boys quickly got the ball back and wanted to get the game restarted to try to get the winner - and that is the attitude they have. We got our rewards with the winner."
Liverpool U18s: Ojrzynski, Walls, Norris, Savage, Koumetio, Clarkson, Hill (Morton, 55), Cain, Stewart, O'Rourke, Brookwell (Beck, 75).
Unused substitutes: Hewitson, Quansah, Balagizi.