(1) Background: The closure of schools and the transition to online teaching because of the COVID-19 pandemic’s restrictions have resulted in significant changes in the workplace. Consequently, several resilience strategies have been implemented, and chief among them focus on the topic of burnout and coping abilities; (2) Purpose: Thus, this study investigates the influence of self-esteem, dispositional hope, and mattering on teacher resilience, and how crisis self-efficacy and gender differences mediate and moderate the relationships among associated variables. (3) Methods: This is a cross-sectional study with a cluster random sampling. A total of 248 secondary school teachers in Malaysia participated in this study. Questions were first transferred and formatted using a template of a commercial internet survey provider. Then, the university’s online learning platform was used both as a questionnaire distribution channel and a data collection method. Data analysis was conducted using structural equation modeling (SEM) with a partial least squares method; (4) Results: The findings of this study revealed that self-esteem, dispositional hope, and mattering significantly influence teacher resilience, and crisis self-efficacy mediates the impact of self-esteem and dispositional hope on teacher resilience. In some instances, the results also showed that gender has a moderating effect on teacher resilience during the pandemic; (5) Conclusions: This study used psychological factors to understand teacher resilience and incorporated crisis self-efficacy into teacher resilience research. It is one of the very few studies in resilience literature to investigate the moderating role of gender on teacher resilience.