This is a fundamental concept that needs to be clarified early in sAdhanA. Here is a classic example of needing to know the context in which a Sanskrit word is used. There are two words in Sanskrit that are translated as knowledge: vidyA and jnAna. But especially when used in the spiritual context, they can refer to fundamentally different ways of knowing. For instance, while vid is the root verb that is 'to know', there are two kinds of vidyA or knowledge. One is the aparA vidyA, or lower knowledge: the knowledge of grammar, music, the arts and sciences. The other is parA vidyA, or the higher knowledge that is beyond. Swami RAma calls this the knowledge of the other shore. Now from the root vid are formed two derivative words: a vidyArthi is one who seeks knowledge, or in other words a student. However, this student may not necessarily be a spiritual aspirant if he or she pursues the aparA vidyA. The seeker of parA vidyA is a sAdhaka. Similarly, a vidvAn can be someone who has knowledge of music, but it can also refer to an illumined sage when used in the context of the Upanishad (cf. MuNDaka Up. III.2.8).
The other root verb jnA always signifies a higher way of knowing, so that jnAna translates more accurately as gnosis than knowledge. In India no one would ever confuse a jnAni (sage, or seer) for a music vidvAn. They are just two fundamentally different types of people. Monier-Williams' Sanskrit-English dictionary gives as one meaning for jnAna: "esp. the higher knowledge (derived from meditation on the one Universal Spirit (in SAmkhya)."
This distinction is very important for the sAdhaka to understand early on the path.
aparA vidyA is that which can be obtained through the mind and senses. This is the lower knowledge. One of the main points of Yoga as expounded in the Yoga sUtras is that the mind and senses are imperfect ways of knowing. The intuitive recognition of this imperfection itself requires some depth of meditation, but even without that we can comprehend that the mind is variable: our conception of things changes from one moment to the other. SwAmiJ's website has some excellent articles on the mind and the senses. However, the Truth that is sought is eternal. Recognizing that the mind and the senses are variable, it makes sense that the Truth cannot be apprehended through these variable instruments of perception.
One needs to use the appropriate means for the purpose at hand. The ancient Vedic seers recognized that some other means of knowing was necessary to gain true knowledge that is eternal. Just as a microbiologist would not use a telescope to observe a bacterial sample, the sAdhaka does not use the mind to gain parAvidyA. However, the mind is quite useful in the external world for gaining aparA vidyA.
This higher knowledge, or parA vidyA can only be obtained through jnAna (Gnosis) in the depths of meditation that goes beyond the mind. In referring to the state of nirvicAra samAdhi, the Yoga sUtras 1.48 say 'RtambharA tatra prajnA'. The knowledge in that state is filled with truth. In that state the 'infinite library of wisdom' that SwAmi RAma refers to, is finally made available to the aspirant.
The insights obtained through Gnosis is self-derived knowledge that can never be refuted. It is beyond every form of mentation. This intuitive knowing is not the instinctive gut-feeling that people sometimes rely on and call a hunch (see SwAmi Ajaya and SwAmi RAma's Yoga and Psychotherapy). This higher knowledge gives rise to unshakeable conviction and great inner strength because it is not learned knowledge, and does not rely on any book or any theory.
The depth of conviction from this Gnosis is so great that it gave Socrates and Jesus the power to face death calmly. In our own times, we have seen how depth of conviction enabled Gandhi to resist the entire might of the British Empire.
Now each darshana, or revelation, in the Vedic tradition evolved its own valid forms of obtaining knowledge. In Yoga, the valid means of obtaining knowledge is called pramANa. There are three such pramANa-s: pratyaksha, anumAna, AgamAh. (refer Yoga sUtra 1.7).
Pratyaksha is often translated as perception, but this is liable to misinterpretation (MW gives both direct perception and apprehension by the senses in as one of the pramANa-s in nyAya darshana). Analyzing the meaning of the Sanskrit word yields more insight. Pratyaksha means that which is literally in front of our eyes (prati + aksha). Aksha in Sanskrit means eye. Now here is a curious paradox. For the Yoga sUtra talks about concentration, meditation and samAdhi, what might be meant by this 'in front of your eyes'. The true meaning of pratyaksha is direct experience through samAdhi. The reason is because the 'seeing' with 'aksh' is used in a different sense in the Vedic texts. The Vedic Seers are often said to have 'seen' or 'heard' the Truth and the VedA-s. It turns out that intense experiences of light and sound characterize the deeper states of meditation. These are the manifestations of Consciousness itself as jyOti (light) and nAda (sound) brahman. The nAda is also called the anAhata nAda (or unstruck sound). These are not sense perceptions in the ordinary sense of the word, but arise probably due to the fact that in the deeper states of meditation certain brain areas are stimulated that are close to those parts of the brain responsible for optical and auditory reception. Therefore, even in the absence of external sounds and light, the sAdhaka may experience intense sound and light in the advanced stages.
Even now in India, you may hear the word 'sAkshAt': this means apprehending something in its true and original form, not just seeing it with your eyes. So what Patanjali is saying is that the pinnacle of knowing something is through direct experience. That is why pratyaksha comes first and foremost of the pramANa-s.
Then comes anumAna: this is inference. An example of anumAna is that if you experience Atman within yourself as pure consciousness, then it stands to reason that all other human beings must also have Atman within themselves, even if you haven't directly experienced their consciousness. This is the second means of knowing, and inferior to pratyaksha. But it is a very useful step that is necessary for the aspirant along the path.
Finally, we come to the Agamas. These are the scriptures or accepted testimony of the Seers. Strictly speaking in the Vedic tradition we distinguish between Shruti and Smrti (the former being that which was revealed to the Rshis or Seers, and the latter being later scriptural texts attributed to human authors; the Shruti are apAurushIya, or beyond human authorship.). So one can interpret the Agamas here as the Shruti.
The idea is that the aspirant should accept the scripture as provisionally correct, and progressively experience the entire truth directly through sAdhanA. It is very useful to keep this concept of provisional belief in mind. The Upanishads and the system of Yoga are not based on blind belief. They invite the aspirant to test these truths in the inner laboratory of one's self. This then leads to firm conviction about the Truth.