where can I get the last key of the gate in the shrine
I guess you're talking about the stone lizard pieces? Since I don't know which one you're missing I'll just list them all.
There's one in the bandit camp as a random event in which Tank chases one of the thugs.
There's one as a reward for a quest from the day witch in the dark swamp.
There's one you can find simply by exploring the swamp or dark swamp.