There is no foolproof solution for a relationship on the rocks. Sometimes two people grow apart or even fall out of love, dooming the relationship despite everyone's best efforts. Nonetheless, if both partners are willing to give it their all, they can usually work through their problems and make the relationship work. If you and your partner are still in love, it is certainly worth trying.
Agree to talk it out. Before you and your partner can fix your relationship, you need to both agree that there is a problem and commit to sitting down and finding a solution to it. Choose a time and place to talk about your relationship where you will both feel comfortable and neither partner will feel rushed. If you both feel comfortable, you can begin immediately. If one or both of you needs some time to get their thoughts together, have the talk later.
Agree on ground rules before you meet. Both partners should agree not to shout at, insult or physically touch the other. Both partners should strive to use "I language" such as, "I feel like you haven't been paying as much attention to me as you used to," rather than "you language" such as, "You never pay attention to me anymore."
Listen to your partner carefully, and paraphrase what she said to show her that you understand her concerns. Then state your opinions and concerns.
Come up with solutions that both partners can live with. Resolve to work at the relationship as a team.
Spend time with your partner doing things that you both enjoy. If you can, take a romantic weekend trip together.
Conscientiously avoid falling into old patterns. If you begin to argue, or one partner does something that she agreed not to do, stop it before it can go further. Old habits are hard to break, so you will have to stay vigilant.
Check in with each other frequently, but not constantly, to discuss how the relationship is progressing. Once or twice a week, discuss the concerns that you've both had and how both partners think the relationship is progressing.