Cursed gates can be opened by 3 different options:
You can ask your friends for Torches and open the gate with 3 of them!
You can use the stars you have earned by playing the levels and use them to open the gate - provided you have enough to open the gate. You can return back and replay the levels to earn more stars!
If none of the above suits you, you can always use Rubies to open the gates for a quick and easy solution!