One dinosaur happy to support another 😃
If you purchased a supposedly SIMfree phone from Carphone Warehouse or similar then your phone will be locked to the host network of the first SIM inserted (O2). giffgaff do not lock phones and therefore do not provide an unlocking service.
All iPhone 7 series (or earlier) purchased from a retailer like Carphone Warehouse, is likely to have been one that Apple intentionally locked to the first network used.
To unlock you will need to get an O2 PAYG sim.
Once your phone has been registered on the O2 network for 24 hours contact O2 and request an unlock code or unlock sequence (depending on phone).
Do not mention giffgaff or O2 will give you the runaround claiming they cannot unlock it.
If it is an iPhone, once you have confirmed it is unlocked you will need to sync with iTunes with a non O2 SIM inserted to complete the unlock.
You might also like to review this thread as giffgaff MAY liaise with O2 for you to unlock it for free (it is though, solely at their discretion) if you have been a giffgaff customer for some time: https://community.giffgaff.com/t5/Contribute/QUERY-Can-agents-now-request-a-network-unlock/m-p/20258341#M498031