Your boss may value you much more than you realized, and make a counteroffer. Being polite and dignified about your resignation could make this possible. You will need to consider in advance whether you would stay for a pay raise, increased benefits, a promotion, or other incentives.
Your meeting with your boss would be a prime negotiating opportunity, so be prepared for it, and know your own bottom line. If staying is an option, what would make you open to it? However, keep in mind that counter offers can have some serious downsides. If you are given a counteroffer, be sure to request for any counteroffer to be put in writing and signed. Those signatures would preferably be your boss, supervisor, and human resources. When considering a counteroffer, honestly evaluate why you want to leave—and protect yourself. While a raise might be nice, it might not solve other issues that require either a promotion (if your job advancement has stalled) or a transfer to another group (if you have personality conflicts with your boss).