You need to contact your employer for a corrected W-2 and probably amend the return if it is accepted by the IRS.
It is quite possible that your IRS tax withholding account and the Social Security wage records account will not be properly credited with your tax withholding and/or Social Security wages if your SSN is incorrect on the W-2.
After the correction, I would request a wages statement from the SSA to be sure that your account has been probably credited now and in the past - that could affect the amount of Social Security you receive when you retire.
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**