S ranks are primarily driven by how much health you have remaining and the number of stars you have from the quick time events at the end of the fight. Oddly enough, the more stars you get the more health you recover. That said, you'll naturally want all of the stars you can get. Quick time events occur when the character icon begins to flash, so be ready once you see this.
This is your first opportunity at an S rank trophy and it comes during the sparring drill where Naruto and Sakura pair up against Kakashi in the training grounds. You'll notice his health bar is much longer than your standard opponent, however the start of the battle is much like any other. Strings of combos after dashing in or even a few Rasengan's will take off a good portion of his health. You'll have an assist available from Sakura as well, but it won't be necessary during the first phase of the battle.
After taking out a couple of bars, his icon will begin to flash meaning you're about to experience a quick time event. I'll give you the list of commands in order so you can receive the maximum amount of stars.
That will finish out the first batch of QTE's. Now, Kakashi will fight you a bit more seriously and have techniques that involve the stage. He'll summon water dragons from the water which can be easily evaded. Another technique he uses is his lightning blade, which can be in the form of a lunge towards you or to electrocute the waters. To avoid this, simply move on the rock platforms surrounded by light. When Kakashi is up on the ledge, you can use Sakura's assist to knock him back down on to the water in order to land some more hits on him.
Once again, after doing some damage his icon will flash meaning it's time for another QTE. The actions are in this order.
Triangle Triangle O
If you've done the inputs correctly, you should unlock the secret factor and be well on your way to an S rank and this trophy!