The GPG applet is inside the YubiKey and running entirely on there, to the best of my knowledge.
Update: new YKs with new firmware are apparently able to provide proofs that the keys were generated on hardware.
https://news.ycombinator.com/item?id=21523354