.. I am new to Yukons and Tahoes.
Had a similar thing happen on a Buick Rendezvous. My car would just stop running, it would crank start and immediately die, then it would only crank... I would go out and remove the fuse/relay panel and mess around and it would magically start working. I replaced the fuel pump, battery, and several other things, I got a code telling me the alternator was not putting out enough voltage...
What I found was (Without going into detai) the Under the hood fuse/relay block panel was not put together correctly at the factory. I ended up taking the top half apart, realigning the wires so they were routed correctly (it looked like a 5 year old put it together) and then I put it all back together. I noticed that one of the contacts appeared burnt between the top and the bottom parts and I cleaned that up. It has not given me a problem since...
I suspect it is similar design, as most cars I have had lately had this time of under hood fuse/relay block there should be several golden hex screws holding the two halves together, and when you remove them you have to pull it all apart. The screws usually stay in the upper half of the block with the fuses and relays. Keep in mind that the fuse block there are several sections of wires & plugs that come into it and they all have a particular place they must be to get it all back together, its pretty obvious when you look at it. Clean up any corrosion or burnt looking connectors and then put it all back together. You can also get the dielectric grease which might help it from corroding any more too...
It might be completely unrelated but that was my problem, it sounds familiar.
Hope it helps
John