J. Danbé's "Petite Gavotte" (ca. 1888) for violin and piano seems to be baroque mainly because of the title, "Gavotte", which was a common baroque dance. But I can't find any strong argument to defend that choice and the composer is from the 19th century, so I don't really know if this is a piece composed in the baroque style after that period or it's just "pretending" to be baroque
This piece is a romantic-era throwback to the earlier style. Here is a broad outline of how one can determine the style for this and other pieces.
Begin with the title
The title of a piece is clearly the first clue, in part because it suggests the era, but even more so because it suggests the style. A waltz in any era can be expected to be in 3/4 time, for example.
gavotte: an elegant dance in moderate duple meter and in binary form, often with a homophonic texture and simple rhythms. (SOURCE)
Based on that definition, the piece could be a baroque-era throwback. It's in duple meter (2/4) and the texture is homophonic (the piano part is a simple oom-pah oom-pah part outlining the chords).
A case could also be made that the piece is in binary form; however, not in the fairly strict sense that one would expect of a baroque piece. This piece has more the structure of a theme and variations.
For a dance, look at the rhythm
The phrases of the 18th-century French court gavotte begin in the middle of the bar, creating a half-measure (half-bar) upbeat. (SOURCE)
Although there are cases, especially in the romantic era, of gavottes that begin on the downbeat, this piece clearly begins its phrases on the upbeat.
Examine the harmony (the "harmonic language")
In a baroque-era piece, given the technical limitations of the time, we would expect a principal key with visits to the dominant or relative minor keys. More distant keys would be less likely.
The "Petite Gavotte" plays it relatively safe in the first sections, but by measure 29 Danbé moves further afield. For example, the top-of-staff G in m. 29 is a chordal 9th. The leaps that precede it are a decidedly romantic gesture.
The "oom-pah" style piano part is not especially baroque. But the most obviously non-baroque section is the part in all sixteenth notes. That section alone places this gavotte in the "showpiece" category, which is decidedly romantic.
Regarding "throwback" pieces
It has been common in all eras of music to "look back" to earlier forms and styles for inspiration. Brahms looked to early church styles and Prokofiev wrote a "Classical Symphony", just to name a couple of famous examples. In general, a piece with a title like "Gavotte" can be best placed in the era of its composer, who likely wants to place their own aesthetic on top of a familiar form.
Some elaboration in addition to the answer given by @Aaron:
As he pointed out, it is the style of the music which determines whether it is in baroque style, not the title.
Arnold Schoenberg wrote a suite for piano, opus 25. One of the movements is a Gavotte. You can see just by looking at the sheet music that the style is certainly different from baroque style:
Here you can listen to the piece:
Titles are a poor guide to identifying an era.
Many 19th century composers wrote Gavottes. They typically follow the general form and style of a baroque gavotte (duple or quadruple meter, moderate tempo, etc.) but most 19th century gavottes begin on beat 1, while baroque gavottes start on beat 2 (in 2/4 or 2/2) or 3 (in 4/4).
It looks to me like Saenger was writing in the baroque style, but I can't be certain of that because of one detail: the a tempo instruction at the beginning of the 9th line. A baroque gavotte will have strict rhythm throughout. Saenger's gavotte notes that it's in strict rhythm... but the a tempo isn't needed unless there's a ritardando or accelerando somewhere, and I don't see one.
It's possible that a different edition shows an alteration of tempo, and the one you posted left it out. If so, it's a romantic piece. If not, it's got me curious - why would you return to a tempo you've never left?
Dance names like Gavotte, gigue, etc are well known Baroque dances, but that doesn't mean they are only Baroque. Some are older like the pavane and gigue, some continued after, like gigue, saraband, and gavotte. Look for the typical "bass and chord" accompaniment for 19th century Romantic works.
The gavotte from different eras:
The web site IMSLP has some browse features that will combine various terms including gavotte and periods. That has quite a lot you could browse through for examples.
Regarding determining the style the most obvious thing to look for is the texture, whether it is Baroque contrapuntal or Romantic homophonic.
This Baroque example is contrapuntal, notice the linear, melodic bass with lots of step-wise motion...
compare that with this Romantic era example with lots of bass & chord accompaniment in the left hand...
When you start comparing such different styles for what is supposed to be the same dance the thing to realize is these are stylized art music dances. The only thing that really makes them a gavotte are: a moderate tempo, common time, a half bar anacrusis beginning phrases.