"As the first woman to win album of the year at the Grammys twice, I want to say to all the young women out there, there are going to be people along the way who will try to undercut your success," she said in her acceptance speech.
"But if you just focus on the work and you don't let those people sidetrack you, someday when you get where you're going, you'll know it is you and the people who love you who put you there," Swift said.
Record of the year went to "Uptown Funk", Mark Ronson's song that featured Bruno Mars on vocals.
Ed Sheeran won song of the year for "Thinking Out Loud." The honor, a songwriter's award, seemed to catch Sheeran off guard.
"My parents come every year and every time I lose," he said.
Not this year.
Kendrick Lamar, who led all artists with 11 nominations -- one short of the record set by Michael Jackson in 1984 -- came up empty in the big categories, but did win best rap album for "To Pimp a Butterfly" among his honors.
He won four before the broadcast, for rap performance, rap song, rap/sung collaboration and music video (a partial honor he shared with Swift) -- and also gave one of the show's best live performances.
Tears for Trainor
Meghan Trainor won best new artist and reacted with joyful tears.
"I have to thank L.A. Reid for looking at me like an artist instead of just a songwriter," the "All About That Bass" singer said, audibly sobbing.
"I'm a mess. I have to go cry," Trainor said.
LL Cool J, the host of the show, took care of the obvious joke at the top of the broadcast, introducing "Hello" singer Adele from the audience and then suggesting Lionel Richie -- who also sang a song called "Hello" -- tell Adele, well, you know.
The Weeknd, who was nominated for seven awards, won a pair of them: R&B performance for "Earned It (Fifty Shades of Grey)" and urban contemporary album for "Beauty Behind the Madness."
Other winners included the other album of the year nominees, Alabama Shakes (for alternative music album and best rock song) and Chris Stapleton (for country solo performance), as well as former President Jimmy Carter
(for the audiobook of his memoir, "A Full Life: Reflections at Ninety"), Mark Ronson feat. Bruno Mars (for pop duo/group performance) and Ed Sheeran (pop solo performance).
Stapleton's "Traveller" won best country album and Alabama Shakes' "Don't Wanna Fight" won best rock performance.
Tributes in song
Much of the action was in the form of tributes.
Lionel Richie received a tribute from Trainor, Luke Bryan, John Legend, Demi Lovato and Tyrese, performing a medley of his songs. Richie is the MusiCares Person of the Year
Three recently deceased artists got very different treatments.
Lady Gaga paid homage to David Bowie, playing snippets of some of Bowie's greatest hits, such as "Space Oddity," "Changes," "Ziggy Stardust," "Suffragette City," "Rebel Rebel," "Fashion," "Fame," "Let's Dance" and "Heroes." She was joined by guitarist and producer Nile Rodgers on the last two.
Eagles Don Henley, Joe Walsh, Timothy B. Schmit and Bernie Leadon saluted Glenn Frey with a performance of "Take It Easy." Jackson Browne, the song's co-writer, joined them on stage.
Bowie and Frey died in January.
Stevie Wonder and Pentatonix honored the late Maurice White of Earth, Wind & Fire with an a cappella version of "That's the Way of the World." The band's surviving members presented the award for album of the year.
White died February 4. The Grammys announced that Earth, Wind & Fire will receive one of its Lifetime Achievement Awards at a separate ceremony in the spring.
The cast of the Broadway hit "Hamilton"
performed the musical's opening number live from New York, and not long after was rewarded with a Grammy for best musical theater album.
Composer Lin-Manuel Miranda rapped his thank-you speech.