Whoa, slow down there horsie.
Could it be a head gasket, sure. What if it's dirty injectors leaking down fuel into a couple of cylinders and you yank the cylinder head off...?
I'd suggest some testing is in order before you attack any repairs.
Get a higher level scanner where you can see not only fault codes but number/times/mileage any faults occur.
Live data is a HUGE plus.
Hook up a fuel pressure tester to a warm engine, start & shut off. Watch for large pressure drop after an hour or two. If it does, could very well be leaking (drip down) injectors giving rise to your issue.