Is your device actually unlocked (or at least locked to O2)? Even an unactivated giffgaff SIM will display signal bars/dots and will not request a 'network PIN', 'SIM unlock code' or display a 'SIM not supported' message on an unlocked phone.
Do you get any signal bars? No signal bars is a pretty clear sign that the device is still locked to a network other than O2 / giffgaff.
Have you tried / can you please try the SIM in another (definitely unlocked) device? If it works then your device is still locked and you need to either contact the previous network on which the device was used or a good mobile unlocking service.
If your phone continues to show an 'unavailable' message with a different sim card I would recommend that you visit www.imeipro.info
which is a free website). If your device was purchased second hand it is possible that it is blacklisted (and has been reported as lost or stolen).