A commentary of the said verse by Al Wahidi explains the occasion of its revelation:
Said Muqatil: “This verse (Men are in charge of women…) was revealed
about Sa‘d ibn al-Rabi‘, who was one of the leaders of the Helpers
(nuqaba’), and his wife Habibah bint Zayd ibn Abi Zuhayr, both of whom
from the Helpers. It happened Sa‘d hit his wife on the face because
she rebelled against him. Then her father went with her to see the
Prophet, Allah bless him and give him peace. He said to him: ‘I gave
him my daughter in marriage and he slapped her’. The Prophet, Allah
bless him and give him peace, said:
‘Let her have retaliation against her husband’.
As she was leaving with her father to execute retaliation, the
Prophet, Allah bless him and give him peace, called them and said:
‘Come back; Gabriel has come to me’, and Allah, exalted is He,
revealed this verse. The Messenger of Allah, Allah bless him and give
him peace, said: ‘We wanted something while Allah wanted something
else, and that which Allah wants is good’.
In another narration, Yunus ibn al-Hasan who reported that a man
slapped his wife and she complained about him to the Prophet, Allah
bless him and give him peace. Her family who went with her said, “O
Messenger of Allah! So-and-so has slapped our girl”. The Prophet,
Allah bless him and give him peace, kept saying,
“Retaliation! Retaliation! And there is no other judgement to be
held”.
But then this verse (Men are in charge of women…) was revealed and the
Prophet, Allah bless him and give him peace, said: “We wanted
something and Allah wanted something else”.
http://quranx.com/Tafsirs/4.34
It seems that the Prophet made a mistake in his judgement and Allah corrected him by sending his angel.