While both of those things could very well be true, and often are true, they are not the only possibility. Maybe Satan is fighting against you. We see this often in the Bible. We see Job, Jesus and Peter being attacked by Satan, so clearly this happens to Christians today. Satan went after Jesus, and if you are His disciple, Jesus has promised that you will go through trials as well. That is part of having an enemy.
It could also be that you are just going through a tough time in life. After all, Jesus said "The rain falls on the just and the unjust." Or, as a friend of mine stated, "Everyone's grandma dies". Though a little blunt for our taste, that statement is certainly true. Bad things happen because that is part of life.
But I find myself unable to tell someone that God isn't causing their trials. As a matter of fact, the further I go in life, and the more I study Scripture, I find myself cringing a little when someone else says it. Is this because I think God likes to watch us suffer? Of course not.
My reasons can be summed up rather well by looking at a passage in Hebrews 12.
6 And have you forgotten the exhortation that addresses you as sons?
"My son, do not regard lightly the discipline of the Lord,
nor be weary when reproved by him.
For the Lord disciplines the one he loves,
and chastises every son whom he receives.”
7 It is for discipline that you have to endure. God is treating you as sons. For what son is there whom his father does not discipline?
8 If you are left without discipline, in which all have participated, then you are illegitimate children and not sons.
9 Besides this, we have had earthly fathers who disciplined us and we respected them. Shall we not much more be subject to the Father of spirits and live?
10 For they disciplined us for a short time as it seemed best to them, but he disciplines us for our good, that we may share his holiness.
11 For the moment all discipline seems painful rather than pleasant, but later it yields the peaceful fruit of righteousness to those who have been trained by it.
While God may not be "punishing" you, it is possible that He's disciplining you. After all, this is what a father, who genuinely loves his child, does for them. God is not so unloving that He will let us go on in our lives living less than the full life He wants us to have. Instead He will discipline.
So when you're going through a tough trial, particularly when you can't seem to shake your trial, don't assume God isn't trying to get your attention. Take some time to think, pray and allow the Holy Spirit to guide you in your Scripture readings. Be honest with God and listen for His voice. I can assure you that He will be honest with you.