What gives is defined as something you ask when you aren't sure why someone is doing something or acting a certain way.
(idiom)An example of when to say "what gives" is when your friend promised you the extra concert ticket but then decided at the last minute to give it to a different friend for no reason.