By forcing myself to play it repeatedly until my brain is a fine paste, apparently.
The Gradius games test my patience more than anything else. For the first one (PC-Engine version) I was able to get good at most of it within a few days, such that it became mostly mundane - that is, when powered up. And yet it took me weeks to actually beat it, because the only way I could do it was by playing through without getting hit. And something stupid somewhere would always get me. Especially in that level added for the PC-Engine version and the last one. On multiple occasions I got hit right before the end. Then restart and repeat. I got so tired of the first few stages. When I finally beat it, after several attempts late into one weekend night, I was actually in tears.
Strangely Salamander (PC-Engine version) and Lifeforce (NES) didn't give me nearly as much trouble. I actually beat both before even moving on to Gradius. Still had to largely get through without getting hit, though.
But Gradius 2 (PC-Engine CD version) really takes the cake. That is probably the most frustrating game I've ever played, that still offers enough incentive to want to play it. I've beaten it in easy mode, but never managed to beat normal, even after months of attempts. I can make it through large portions of the game without getting hit on savestate - including making it from around level 4 to beating it - but on some levels I don't have a great chance of not getting hit (< 50%) and that all compounds. I was pretty sure I would have done it by now, but apparently I couldn't.
Then there's Gradius 3 (SNES version), which I beat after a few days. All of the added powerups/protection and slowdown make the game a joke in comparison to the two before it.