Al-jawab billahi at-taufeeq (the answer with Allah's guidance)
1) If a woman passes away and there are no women to perform the Ghusl, the husband cannot perform the Ghusl of his wife. The husband may see his wife but he may not touch her. This is because the wife passing away cancels the Nikah and the husband may marry the wife's sister.
2) If a man passes away and there are No males to bathe him, then no other woman besides his wife is permitted to carry out the Ghusl. The wife can see, touch and kiss him. This is because the husband passing away does not cancel the Nikah, as the Nikah still remains until the completion of her 'Iddat (Four months and ten days).