Before starting a story mission, the game will tell you what is required for a gold ranking. Meet those expectations, mostly dealing with beating the level in a certain amount of time. Equip Diamond Dash to go faster through levels, avoiding any enemies you can. For missions where you're mostly fighting (such as bosses where you can't lose a life) then equip the Iron Fortitude. The ranking is shown next to the level so you know what you've earned already in each mission.
Click HERE for more help on these challenges.