Yes, Newton's third law can be applied to the gravitational forces. The gravitational forces are mutual too. The force applied by a planet on another planet is considered as an active force, in return, another planet also applies an equal and opposite force on the same planet. Which proofs Newton's third law.