Sometimes when you start a job, you don't really know your value in the market and neither does your employer. As you gain more experience and spend a few years at your job your market value as an employee would generally increase. If you've been at the same company, you would've gotten a number of promotions and raises in your time there. While you might be satisfied with what you're getting as you are actually getting periodical increments, your actual market value might be much higher than your current salary.
Most people find out about this fact when they get a job offer with a much higher salary attached to it. Someone who has been a 'team lead' for a number of years might even get offered a job as 'team manager'. A lot of times you haven't been promoted to that position at your company yet because there is someone already in that position and it hasn't become vacant as long as you've been there. This leaves you with a predicament. If you're satisfied with your working conditions, you might not actually want to leave your job but finding out you could be earning a larger paycheck every month could lead you to have second thoughts.
If you're a valuable employee for your company and you know that finding a replacement for you would be a hard task, even your management would prefer that you try to renegotiate your contract with them rather than leaving the company. Not a lot of employers want to lose someone who they've invested years of training in. The wealth of knowledge about your company and its work that you've collected cannot be replaced with a new person who they would have to train from the start and integrate into their company anew.
This is why taking your new job offer to your management to renegotiate your contract is the only logical decision. Not only would you have a highly useable bargaining chip, you will also be showing your employers loyalty by going to them first. Employers value loyalty more than anything else so this will automatically put you in good standing with them and make negotiations much easier for you. Having a cash value assigned to you will also give you a good starting point for your negotiations as your employers would normally try to match that amount or offer you something that is close enough.
If your employer has the budget, they would go ahead and match the offer you got. If not, they may still offer you a better deal. This could mean a lower pay increment but a higher job designation or easier assignment. This is also a good place to discuss your actual work as you also have the option to ask for a different role or position that you feel more comfortable with.
If you've been doing your job well, feel confident that your employer will try their best to keep you at the company. That said, even if they don't give you what you need, you still have that new job offer in your hands and you can use the same process in reverse when negotiating for the new job. You can show them your value to your current company and have them come up with a much better deal for you.