If you read the account you will know that it is a knowledge of good and evil and not just any kind of knowledge. what good is knowing evil to a creature who can only do good, and desires to do that only. U see such is the state of Adam and eve when they were created to r( Eccl 7:29). this knowledge is what works to help man who is now a sinner from sinning, and also works guilt in us now, to convict us of our guilt before God. But prior to adam sinning, mankind did not need that to be what God created him to be. Man only wanted to do righteousness and thats all. Thus i say, it was a blessing for God to withold that from man when he created him.
Furthermore, if God wanted to keep all knowledge from man , trust me there is no way man can know anything. Everything around us will be absolutely beyond our comprehenision for God will either have created a more complicated world, or give man the brain of animals .However that is not the case so when Adam was created he had knowledge, for he had the ability to name the animals according to their true nature . ( Gen 2:20) something which we call scientific classification of animals ( Taxonomy) Finally if God does not want man to have knowledge he would not have revealed his will and himself through the prophets, the bible and ultimately through christ. All these were given so that we may know God, and not be ignorant of him .