S as a ranking above A originates from Japanese games. Aside from Metal Gear Solid 4, it has also been used in other games, such as Gran Turismo series (driving licenses), Devil May Cry (level performance), Final Fantasy VII (chocobo classes), Guilty Gear (character rankings), and countless others.
While the origin is universally acknowledged as Japanese, apparently, no one really knows what it actually stands for. It’s been speculated that it stands for anything from Super to Special, but there’s no confirmation that I can find of any sort of “official” meaning.
Giant Bomb’s S-rank article states that because C was the lowest passing grade in the Japanese school system, “S” was used to allow for a wider range of grades. See the following excerpt:
Originally created in Japan where anything below grade ‘C’ was considered a failure. The ‘S-Rank’ allowed for a wider range of obtainable grades and thus player motivation, meaning that it was soon adopted by western developers who realized that the ‘S-Rank’ was much cooler than the boring ‘A’. An A rank is commonly obtained by getting a 90% to 95%. If the player is flawless or achieves perfection in something, it qualifies as an S . Many people have wondered what the S stands for… Special? Super? No one knows for sure.
The Rank Inflation article on TVTropes mentions the S-ranking as well, however, without any speculation on the origin:
But then what about the players who are really looking for a challenge for whom mere golds aren’t enough? The solution — give them platinum medals to aim for. A-grade not good enough for you? Go for A+, or S. Sometimes, even these inflated ranks are subject to inflation, with A being about average and the real goal being a more different S rank: SS or even SSS.
Urban Dictionary’s S-Rank article (linked article is SFW, but the site itself can have some very NSFW content) also lacks a concrete origin:
Something that is so superlative that it cannot be described by any traditional ranking system. It is A++, 11/10, six stars, and three thumbs up. In rare cases, something can be so exemplary that it becomes SS or even SSS-rank.
Many people have wondered what the S stands for. Special? Super? Schwarzenegger? No one knows for sure.
Comes from Japanese video games, like the Devil May Cry series, where A-rank just wasn’t good enough.
In addition, all 3 of these sites are editable by anyone on in the Internet, so I’m not sure that any of these can be considered concretely reliable, and the assertion on the Giant Bomb article that it’s related to the Japanese grading system has no source and isn’t one I can confirm because I am not familiar with the system.
Basically, as the TVTropes article stated, it’s just a way for there to be a ranking that is better than the “best”, similar to how some games have Platinum medals on top of Gold.