You can unlock the phone using the recovery menu. To access the recovery menu, turn off the phone and then press Volume Down + Home + Power button until the following menu appears:
- TEST REPORT
- CLEAR FLASH
Select 4 and the phone will be reset to the factory defaults.