I have a ticket to Mumbai from Gdansk (Poland) via Abu Dhabi (Etihad airways). Can I go to Muscat instead of going Mumbai if I book one ticket from Abu Dhabi to Muscat (I have Oman Visa)?
The short answer is yes you can avoid flying the second leg of the Gdansk-Mumbai journey. Now, if you have checked-in luggage then that luggage will end up either flying to Mumbai, or being disembarked from the plane and left in Abu Dhabi once the airline realises you are not on the Abu Dhabi-Mumbai flight. So if you do this make sure you have only carry-on luggage.
Now, assuming you have a return ticket Mumbai-Gdansk, due to the missed connection, there is a likelihood that your return ticket will get cancelled. However, there is a certitude that the Abu Dhabi-Gdansk leg will be cancelled if you do not fly the Mumbai-Abu Dhabi journey. So keep this in mind too.
If you decide to go through with your plan, do not forget you will have to check-in, either online or in person, for the Abu Dhabi-Muscat flight and might have to change terminals to get to your gate.