The engines were the same. Some components between the Firebird 400 and GTO engines had different part numbers. If there was any difference at all, I'd give the nod to the Firebird 400 version, as it had a little better flowing exhaust manifolds over the GTO.
The 1967-1968 Firebird 400's had a different Quadrajet baseplate with linkage that only opened to around 3/4 full throttle. This was done for two reasons:
1) To even out the power between the Firebird 400 and GTO so the GTO would still be appealing to buyers. The GTO was Pontiac's flagship performance car.
2) To stay within the 10 lbs per 1 hp guideline that GM set. 3300 lb. Firebird verses 3500 lb. GTO, 330hp verses 350 hp.
The 67-69 Firebird 400's were faster than the 1967-1969 GTO's. But years later, people still look at the advertised hp ratings to compare, and many GTO guys believe their engines were 25-30hp stronger, but they weren't. The engines were the same.
Why the deception?
The story was that when the Pontiac engineers debuted the 1967 Firebird 400 for GM's top brass, management knew they used the GTO 350/360hp 400 engine, complete down to the chrome valve covers, and simply wrote 325 hp down on paper. That didn't cut it, and GM management would not approve the rating, so Pontiac had to cut down the hp output somehow. But rather than fiddling with compression, cam, or heads, they simply devised a throttle limiter. That made GM happy.
Pontiac engineers knew this would be easiest thing for a customer to correct. With just with a pair of pliers, and about a minute of time, you had full throttle again, and then the Firebird outperformed the GTO.