Epidermal growth factor receptor (EGFR) inhibitors interrupt EGFR-dependent cellular signaling pathways that lead to accelerated tumor growth and proliferation. Mutation of a threonine in the inhibitor binding pocket, known as the "gatekeeper", to methionine (T790M) confers acquired resistance to several EGFR-selective inhibitors. We studied interactions between EGFR inhibitors and the gatekeeper residues of the target protein. Thermodynamic integration (TI) with Amber14 indicates that the binding energies of gefitinib and AEE788 to the active state of the T790M mutant EGFR is 3 kcal/mol higher than to the wild type (WT), whereas ATP binding energy to the mutant is similar to the WT. Using metadynamics MD simulations with NAMD v2.9, the conformational equilibrium between the inactive resting state and the catalytically competent activate state was determined for the WT EGFR. When combined with the results obtained by Sutto and Gervasio, our simulations showed that the T790M point mutation lowers the free energy of the active state by 5 kcal/mol relative to the inactive state of the enzyme. Relative to the WT, the T790M mutant binds gefitinib more strongly. The T790M mutation is nevertheless resistant due to its increased binding of ATP. By contrast, the binding of AEE788 to the active state causes a conformational change in the αC-helix adjacent to the inhibitor binding pocket, that results in a 2 kcal/mol energy penalty. The energy penalty explains why the binding of AEE788 to the T790M mutant is unfavorable relative to binding to WT EGFR. These results establish the role of the gatekeeper mutation on inhibitor selectivity. Additional molecular dynamics (MD) simulations, TI, and metadynamics MD simulations reveal the origins of the changes in binding energy of WT and mutants.