There are a couple differences between the Barrett and Gilmour eras of Pink Floyd. One of the biggest differences was that when Barrett was in Floyd, he was pretty much the lead composer of the band, whereas after Barrett left, composing was more evenly distributed, at least initially. So essentially Barrett-era Floyd was Barrett's band, to the point where Pink Floyd's managers terminated their relationship with Pink Floyd in order to represent Barrett upon his firing from the band, thinking that he'd be more successful. After Barrett left, Pink Floyd became a collaboration between the three original members and Gilmour, until Waters emerged as the main songwriter.
If you take a look at the track listing for The Piper At The Gates Of Dawn, Barrett is the sole composer of 8 of the 11 tracks, and co-composed all but one song, "Take Up Thy Stethoscope and Walk", written by Roger Waters. As noted on Wikipedia, the lyrics to "Take Up Thy Stethoscope and Walk" are markedly different in tone from the lyrics on the rest of the songs on the album.
Its morbid lyrics are quite unlike anything else on the album, the rest of which was penned by Barrett, but is characteristic of much of Waters' work.
So already, even on their first album, there were some differences in sound between Barrett's psychedelic music with whimsical lyrics, and other band members' musical preferences.
This becomes even more apparent on the band's follow up album, A Saucerful of Secrets, where, at least to me, Barrett's only contribution to the album, "Jugband Blues", sticks out like a sore thumb. It has all of the main features of a Barrett song: it's weird, features strange instrumentation, and feels psychedelic. The rest of the album sounds more like spacey progressive rock, again, at least to me.
As the band continued to record albums, they moved further and further away from the psychedelic sound of their early days, moving more towards their progressive rock sound on albums Ummagumma, Atom Heart Mother, and Meddle, until they reached their peak period starting with Dark Side Of The Moon.
So, TL;DR, Barrett-era Floyd was run by Barrett and they played psychedelic rock, while Gilmour-era Floyd was more of a collaboration (until Waters emerged as the songwriting leader) and they played progressive rock.