This happens because of how Vitamins work. Basically, they'll only work for the first 100 EVs in a stat. This means that every time the game tells you that the Vitamin would have no effect, it's because the stat has already reached 100 EVs, not because it's maxed out. So don't use that as an indicator, because it's a bad one to use. Super Training is much more accurate.
This means that the only possible explanation for the Vitamins working on Giratina is that the stats you are using them on have not reached 100 EVs yet. Each Vitamin adds 10 EVs and beating a Pokemon/ Super Training adds smaller amounts of EVs. How many Vitamins did you use on each stat exactly?
Also note that the 100 EVs is for each stat individually, not all of them together. So if you added 100 EVs worth of Attack, this would not affect your ability to add EVs to Defence for example.