How do you know you failed the background check? Are you sure this business even did one? Perhaps they are lying to you and are just straight ripping you off.
If you failed the background check when you shouldn't have, there is an appeals process to get it straightened out. After doing so, you should then be able to get the gun you paid for.
If, on the other hand, there was a reason to deny your purchase (i.e. felony or domestic violence conviction, dishonorable discharge) and you were not honest when you filled out the federal form to buy the gun, you may want to rethink presenting those facts to a court of law.