Gap Analysis vs. Internal Audits
Gap Analysis
Even if there is no formal quality management system, every company has some processes in place to interact with customers, take orders, plan and create products or services, and deliver these to customers in order to be paid. If these processes were not in place, a company would not last long. It is this set of processes that is being assessed during a gap analysis.
A gap analysis is mainly done at the beginning of the project to assess what is currently in place against the set of requirements that are going to be used for the implementation. In the case of ISO 9001, you would take each requirement, compare it to what is currently being done, and assess where there is more required for the process currently in place.

For example: ISO 9001 requires that an organization review the requirements that relate to the product or service being produced, and there are certain elements of the ordering process that need to be checked. Do you make sure that the requirements are specified? Do you resolve any differences from the contract or order that are not the same as previously expressed (e.g., you produce products that are black, orange, or red and the customer wants blue)? Can you meet the requirements in the order (e.g., your service takes 3 weeks to complete, but the order requires it to be done in 2 weeks)? The gap analysis is done to see if your current process includes all of these things, and to identify what else needs to be included to fully meet the requirements.
V/S
Internal audit
By comparison, an internal audit is used to assess a process against the procedure that it is supposed to follow, as well as checking that the process complies with the requirements of ISO 9001. It is important to remember that the procedure does not need to be documented, but each process will have some requirements, also called criteria or planned arrangements, that need to be met for the process to be successful. The audit will gather audit evidence and compare it to the criteria for the process to see if the criteria are fulfilled. In other words, if your process says you will do something, do you have the evidence to show that you do? This evidence could come in the form of records, statements of fact, or observing personnel doing the job. This internal audit assessment is done on-site, where the gap analysis is commonly done much more superficially through a questionnaire, document review, or similar tool.
