No Shower, No Fruit
The Spirit's work is like a pattern of rain showers that waters the heart with His gracious influences. The Spirit inclines us toward thinking and acting with these nine virtues, appropriately called "fruit" (Gal. 5:23-24). Apart from the Spirit's gracious influences, these virtues would just dry up at the roots and wither away. Praying acceptably to God in such a condition would be impossible.
Here is the order of the Spirit. He first grows the fruit from the shower. He then feeds the prayer from the fruit. To pray without this fruit is to starve your prayer. Prayer is the highest act of selfless devotion, requiring the highest virtues to fulfill. Without the fruit of the Spirit, prayer becomes increasingly selfish and destructive (James 4:1-6). As James says, a fruitless Christian will either totally neglect prayer ("ye ask not" v.2), or will totally abuse prayer ("ye ask amiss" v.3).
Unconfessed sin will always cause the Spirit to withhold His gracious showers. The flesh will grow plenty of weeds, but zero fruit. And without those nine virtues, prayer becomes a graceless ritual that God cannot accept, much less bless. However, repentance will always bring back the heavenly showers. As Peter once said to dried up religious sinners: "Repent ye therefore, and be converted, that your sins may be blotted out, when the times of refreshing shall come from the presence of the Lord" (Acts. 3:19).