Seems like you did the same thing to them that they did to you.
She gave you a dirty look (which could have meant anything, perhaps you were standing in front of a book she was looking for, who knows?) and so you did the same thing, gave her a dirty look back. For all you know, she was looking over at you because she was waiting for you to finish doing whatever you were doing, and you gave her a dirty look for no reason.