Final Fantasy VII
On a serious note, I think the hardest game I played was either Stargazers or Hydlide, both on the NES. Both are extremely unfairly difficult because you need to do a lot of grinding to move on in both games. A wrong encounter with the wrong enemy will end your game in mere seconds. Both have a weird password save system: the former doesn't save your levels, and the latter has an agonizingly slow password screen that doesn't allow inputs for some frames after a letter was used. NES Hydlide also has a "save/load" feature, but you have to practically save every couple steps because of how haphazardly done the combat is in that game. It also has no SRAM, so if you lose power, the game freezes or something else happens, you're forced to use the password.
Another candidate for the hardest game I've played: Heroes of the Lance, also an NES game. Did you lose Goldmoon, the healer the game put in the front row for no discernible reason? Well, you're screwed because she's the only one who can kill the final boss! There's bottomless pits that if your character falls in, they're permanently dead.