Gaye's 'Let's Get It On' was released in 1973, and Sheeran released number-one hit 'Thinking Out Loud' in 2013.
US District Judge Louis Stanton said a jury should decide the outcome of the lawsuit, but said he found "substantial similarities between several of the two works' musical elements".
The suit was brought against Sheeran, Sony/ATV Music Publishing, and Atlantic Records by the estate of the late Ed Townsend, who co-wrote the Gaye hit.
Sheeran denies ripping off the song.
Mr Stanton said there was a video of Sheeran "seamlessly transitioning" between the songs in a performance.
There has been no response from Sheeran or the record companies over Judge Stanton's ruling.
Sheeran faced a lawsuit against a previous X Factor UK singer, whose song 'Amazing' shared remarkable similarities to his later-released 'Photograph'.