Is the journal in question open access only? Or is it a hybrid journal that has both a subscription option (where you would not be expected to pay publication costs) and an open access option. This would obviously change what options you have.
First off, you can always explain your situation and ask for a waiver. Generally, waivers have to be requested early in the process of manuscript submission (whatever the reason for the waiver is). Most major publishers have explicit rules for this. So I wouldn't count on a waiver this late in the process. It's worth a try though and I think this is your best bet - especially if you are from a developing nation.
Alternatively, you could ask to switch out of open access (assuming the journal is hybrid and has a subscription model as well). I think you might run into an issue here though. Submissions usually contain binding language and the publisher/journal might not let you switch. I don't necessarily think that this is an indication of (low) quality - rather it's dependant on behind-the-scenes bureaucracy.
I don't think there is any harm in pursuing either (or both) of these options. If neither works out, you could always look around for some money to pay for publication. I don't know your situation or affiliation but it may be that your university has some money for this sort of thing. Or there may be some other source of funds. I think it's worth looking into.
Personally, I would not pay out-of-pocket for this. At that point, withdraw and resubmit elsewhere. Assuming you've initially submitted to a quality journal, you should have no trouble publishing elsewhere. It isn't unusual to include previous reviews and you could certainly let the editor of a different journal know what's going on (i.e., that the paper was accepted but withdrawn due to funding issues). That isn't a way to circumvent further review but it would likely smooth the process and increase your chances of a quick acceptance.