The acquisition values DreamWorks at approximately $3.8 billion and implies a 27 percent premium to the stock's Wednesday close at $32.20.
Shares of DreamWorks were up 23 percent in early trading Thursday, after being halted on the news.
Comcast is the parent company of NBCUniversal and NBC News.
The deal is expected to close by the end of 2016. When the acquisition is completed, DreamWorks CEO Jeffrey Katzenberg will become chairman of DreamWorks New Media and a consultant to NBCUniversal.
"Having spent the past two decades working together with our team to build DreamWorks Animation into one of the world's most beloved brands, I am proud to say that NBCUniversal is the perfect home for our company; a home that will embrace the legacy of our storytelling and grow our businesses to their fullest potential," Katzenberg said in a statement.
NBCUniversal CEO Steve Burke said that DreamWorks is a great addition to the company and will help it "grow [its] film, television, theme parks and consumer products businesses for years to come."
"Adding DreamWorks to NBCUniversal will help us accelerate all three of these lines of business in the future ... This acquistion is a statement about NBCUniversal's commitment to keep building and investing in the creative part of the business," Burke told CNBC.
DreamWorks will bring a number of popular film franchises to NBCUniversal including "Shrek," "Madagascar," "Kung Fu Panda," and "How to Train Your Dragon."