Despite their occur in different times - Baroque is from the 16th and 17th centuries, and the Realism is from the 19th century - these two art styles keep similarities such as the strong way how the artist portrays and organize the scene, the absence of a conceptual style - both were extremely based on the painter reality and we don't see an idealized portray of life. On the other hand, while Baroque was concerned to interpret and portray religious themes trough a strong mood, Realism wanted to show the secular world and its social problems.
The Baroque style was engulfed by religious passion during the 16th century in Europe and fueled by the Roman Catholic Church, while Realism is a more secular and worldly form of art that focuses on objects and situations. Realism occured during the 18th and 19th century. Art is used to reflect values and ideas.