If your return has been already accepted by the IRS, you will have to file an amended return (1040X) to add the W2. But you might want to wait until your refund or payment is processed. The IRS will only accept amended returns via mail.
Please see the following information on how to amend your return:
https://ttlc.intuit.com/replies/7276596