I think the verse is saying the importance of making amends. Here's the verse in NIV translation with some sourounding context.
Mathew 5:21-26 (NIV)
21 “You have heard that it was said to the people long ago, ‘You shall not murder, and anyone who murders will be subject to judgment.’ 22 But I tell you that anyone who is angry with a brother or sister will be subject to judgment. Again, anyone who says to a brother or sister, ‘Raca,’ is answerable to the court. And anyone who says, ‘You fool!’ will be in danger of the fire of hell.
23 “Therefore, if you are offering your gift at the altar and there remember that your brother or sister has something against you, 24 leave your gift there in front of the altar. First go and be reconciled to them; then come and offer your gift.
25 “Settle matters quickly with your adversary who is taking you to court. Do it while you are still together on the way, or your adversary may hand you over to the judge, and the judge may hand you over to the officer, and you may be thrown into prison. 26 Truly I tell you, you will not get out until you have paid the last penny.
To continue on with that though the sacrifice is different from tithing. Giving a gift on an alter was to either have a grain offering, or an animal offering. They were used to give thanksgiving, remove sins, and a few other occasions I believe. They were also the means the Isrealites provided for the Levities who were the priests in the temple. Those offering weren't just a sacrifice for the people they were food for the priests and their families. (Depending on the offering.)