Hi there~
Yes, you can connect the GND and SIG pins of the Grove Electromagnet to GrovePi+ GND and SIG pins. This is the control signals.
Then you connect the GND and VCC pins of the Grove Electromagnet to external GND and 5V power supply. The external power source will provide better attraction. thanks.