it can be a messy job 2 do
personally what i would do in yourr case to avoid loosing alll of your helpful bacteria is to change the gravel in several stages.
I would be inclined to remove the fish to another tank because your water most likly will get very dirty and may peak your nitrites due to releasing all the trapped waste.
Depending on tank size i would remove 1/2 or 1/3 of the gravel you currently have then replace that with your new gravel therfore the old gravel still has the bacteria and will colonise the new gravel.Then i would do a large water change to bring the water back into safer parameters whilst also getting rid of a lot of the dirt that was disturbed.
If you need to put the fish back into ther tank may be an idea to test your water before you do just to make sure its safe for them
can repeat this process the following week for the remainder off the gravel in which time the new gravel should hopefully now contain the bacteria so you wont get problems like new tank syndrone
this worked for me when i was changing gravel over in 1 of my tanks that uses an undergravle filter which i presume u have.If its not an undergravel and its an internal or external filter you can disregard all of the above and change all the gravel at once due to the bacteria being mainly in the filters themselves and not that much in the gravel.
hope this has been of some help anyway
good luck if you do decide to go through with it
