Amtrak's website says the gates at Chicago Union Station close 5 minutes before train departure. I wouldn't cut it nearly that close, since, depending on which train you are taking, you might not have a reserved seat, so you would want to be at the front of the line to get a better seat. The QR code is all you need for a ticket--one of the conductors will scan your code. I usually print the ticket from my e mail just in case my phone dies, but I'm kind of old school.