This study explored the self-efficacy of senior high school Science, Technology, Engineering, and Mathematics (STEM) students (N = 134) in an online physics class in terms of gender and its relationship to engagement. The study employed a descriptive correlation research design. Adapted instruments namely ‘Sources of Self-Efficacy in Science Course – Physics’ (SSSCP) and ‘Engagement in Physics Scale’ (EPS) were used to collect the data from the students. SSSCP was correlated with the scores of ‘Self-Efficacy for Academic Milestone-Strength’ scale for its validity. Reliability and validity of EPS was examined through Cronbach alpha and confirmatory factor analysis with acceptable results. Mean and standard deviation were used to answer the research questions while independent samples t-test, Cohen’s d, and Pearson r correlation were used to test the hypotheses. It was revealed that both male and female students have a high level of self-efficacy in the following: overall, vicarious experience, verbal persuasion, and performance accomplishment with an average level for the emotional arousal. Furthermore, a significant difference across gender was found only on the emotional arousal sub-level with a small effect size of 0.32. Moreover, positive correlation was found between overall self-efficacy and overall engagement as well as on cognitive engagement. On the other hand, a negative correlation was revealed between overall self-efficacy and emotional engagement. Focusing on increasing the self-efficacy of students in an online physics class should be practiced by teachers in order to increase engagement.