The biggest issue is that you have to get money to them while not looking like a scammer. If you send them a check they may think it is a scam. If you try a money order or gift card the risks are even greater. Once you send them a money order or gift cards the money is gone, and they may just trash the cards and never use them.
Leverage the method you used to learn that they were having an issue. If that is a friend of theirs then work with their friend to get them the money. If they are not comfortable being a go between, then maybe they can recommend a charity or church in their area to facilitate the transfer. If the charity meets with them in person, then the tendency to distrust money sent from anonymous source can be reduced. They can also give the the gift in cash even if you send the money electronically to the church.
If the source of the information can't approach the family because they violated a trust to let you know of the situation, you have a much harder task. It might still be able to find a local charity, but you risk exposing the source of the information. Even just calling them up and telling them you will be sending money may expose your source.