If you experience failure, things have not gone the way you'd hoped. I'm sorry to hear that your attempt to turn hay into gold has been a failure.
Failure can also mean when something suddenly stops working or when you don't do something that you're expected to. A power failure might create an opportunity for a romantic candlelight dinner. Your failure to pay the electric bill may lead to a lot of romantic candlelight dinners, as long as you at least paid the gas bill. Someone who has no success in life a failure, as is an effort that doesn't work like your failure of a presidential campaign.