Is the I/O shield removable from the back of the gateway case?
If it is then you should be able to use any motherboard.
(I/O shield is the metal bezel that the motherboard’s inputs/outputs stick out from)
I wouldn’t put the money into buying another board,I’d part it out and buy another tower.