Climate change and the need for sustainable development have become part of our daily lives. In this context, it is crucial to involve the educational community to the discussion, both students and teachers; by increasing awareness about these issues and the ways school communities can contribute to energy savings, we can kick-start a change towards more sustainable practices in our societies. The Green Awareness in Action (GAIA) H2020 research project implemented an IoT-based approach in several European schools for sustainability awareness and energy efficiency, while at the same time aiming for increasing students' digital skills. By using gamification, competitions and IoT-based educational activities, GAIA engaged directly with teachers and students in order to realize energy-saving activities in their environment. We report here on the use of gamification and competition among schools in this context, and how they helped together with IoT-based lab activities to engage students and educators to participate in the project more actively. We provide details on the implementation of GAIA's intervention in specific school settings to showcase our approach. Our findings, backed up by evaluation data and answers to a survey by 30 educators in Greece and Italy, confirm that the inclusion of competition and gamification aspects can significantly increase students' engagement, especially when having groups/schools competing with each other. Moreover, IoT-based educational activities can supplement existing educational activities in interesting ways, with students evaluating positively the experience and educators reporting increased overall student engagement in their class during the intervention period, and, on average, better class performance compared to previous periods.