If you can, try to clean the gold colored contacts in the SIM slot. Be very careful not to bend the pins or force anything. Use either rubbing alcohol with a Q-Tip or gently rub with a clean pencil eraser.

Worst case, ask your carrier for a replacement SIM card.