If you say something complimentary, like "Grandma, that plastic flower looks so pretty in your hair," you are flattering, praising or admiring someone.
"Resembling a compliment" is one way to define the word complimentary, when you use it in the sense of giving praise. A second meaning of complimentary is "free." If your hotel includes breakfast with the price of your room, they may call it a complimentary breakfast. It's easy to get complimentary confused with complementary, which sounds exactly the same but means "filling in or completing."