“Her health had been deteriorating for many years.”
Your grandmother passed away after being sick for several years. You're back at work now after going to her funeral, and talking to a co-worker who's come to give her condolences. You explain to her that your grandmother's death is not surprising, and you explain it like this.
Her health had been deteriorating for many years.
"Deteriorating" means "getting worse and worse". You can use it to talk about something that's getting worse and doesn't seem like it's going to get better. Here are some examples of things that "deteriorate":
The nation's economic situation is continuing to deteriorate.
The snow is getting thicker, and road conditions are rapidly deteriorating.
We haven't even been married for a year, and I already feel like our relationship is deteriorating
Use "___ had been ___" when:
- you're talking about something that happened in the past
- there was something that happened even before that
- it was a continuing situation
In the example above, the speaker is talking about her grandmother's recent death. Her grandmother's health problems happened before that, and were ongoing. Here's another example:
Something funny happened to me last week. I was sitting in a coffee shop. I'd been waiting there for my sister for 30 minutes. Then I get a text message from her saying "Where are you!?"
Sentences with "had ___ed" are a kind of "double past". In English, you can talk about the past, present, and future from your perspective now. But you can also talk about the past, present, and future in relation to whatever situation you're describing:
I had done it.
I was doing it.
I was going to do it.