You need to defeat the optional boss (the first right at the beginning of the game) and the main boss of the level.
When you start the game you will be too weak to take on the Gozuki, come back just before the main boss and you have levelled up in the Shrine.
Defeat Gozuki at the start of the level, then Mezuki at the and you will unlock the trophy!