If you do something grudgingly, you're not exactly whistling while you work — you're resentful and annoyed and only doing it, probably, because you have to.
A grudge is a lingering resentment against someone, something you can't quite forgive. When you behave grudgingly, you're acting as if you're remembering some past slight or insult. If the guy behind the counter in the deli glares at you and hands you your sandwich grudgingly, you might wonder what you did to make him so grouchy and mad at you.